winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 92e662ed3f6c9c22809e392453805020808329a1
parent 5f9f6ecdd14a095744bf0608d343029aff10f47e
Author: Easton Pillay <easton@planeteaston.com>
Date:   Fri,  4 Mar 2022 16:23:57 -0600

Fixed issues preventing compilation on VS 2022 17.1. (#2000)


Diffstat:
Msrc/AppInstallerCommonCore/Public/winget/Registry.h | 5++++-
Msrc/AppInstallerRepositoryCore/SQLiteWrapper.h | 9++++++---
2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/AppInstallerCommonCore/Public/winget/Registry.h b/src/AppInstallerCommonCore/Public/winget/Registry.h @@ -13,6 +13,9 @@ namespace AppInstaller::Registry { namespace details { + template<DWORD> + constexpr bool dependent_false = false; + template <DWORD Type> struct ValueTypeSpecifics { @@ -20,7 +23,7 @@ namespace AppInstaller::Registry static value_t Convert(const std::vector<BYTE>& data) { - static_assert(false, "No Type specific override has been supplied"); + static_assert(dependent_false<Type>, "No Type specific override has been supplied"); } }; diff --git a/src/AppInstallerRepositoryCore/SQLiteWrapper.h b/src/AppInstallerRepositoryCore/SQLiteWrapper.h @@ -32,20 +32,23 @@ namespace AppInstaller::Repository::SQLite namespace details { + template<typename> + constexpr bool dependent_false = false; + template <typename T, typename = void> struct ParameterSpecificsImpl { static T& ToLog(T&&) { - static_assert(false, "No type specific override has been supplied"); + static_assert(dependent_false<T>, "No type specific override has been supplied"); } static void Bind(sqlite3_stmt*, int, T&&) { - static_assert(false, "No type specific override has been supplied"); + static_assert(dependent_false<T>, "No type specific override has been supplied"); } static T GetColumn(sqlite3_stmt*, int) { - static_assert(false, "No type specific override has been supplied"); + static_assert(dependent_false<T>, "No type specific override has been supplied"); } };