From f61b26563d2b95198b21284251876fb983c37058 Mon Sep 17 00:00:00 2001 From: Easton Pillay Date: Fri, 4 Mar 2022 07:40:22 -0500 Subject: [PATCH] Fixed issues preventing compilation on VS 2022 17.1. --- src/AppInstallerCommonCore/Public/winget/Registry.h | 5 ++++- src/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 index 7764e63ffb..575d448ea9 100644 --- a/src/AppInstallerCommonCore/Public/winget/Registry.h +++ b/src/AppInstallerCommonCore/Public/winget/Registry.h @@ -13,6 +13,9 @@ namespace AppInstaller::Registry { namespace details { + template + constexpr bool dependent_false = false; + template struct ValueTypeSpecifics { @@ -20,7 +23,7 @@ namespace AppInstaller::Registry static value_t Convert(const std::vector& data) { - static_assert(false, "No Type specific override has been supplied"); + static_assert(dependent_false, "No Type specific override has been supplied"); } }; diff --git a/src/AppInstallerRepositoryCore/SQLiteWrapper.h b/src/AppInstallerRepositoryCore/SQLiteWrapper.h index f09591a581..0b66dacbb4 100644 --- a/src/AppInstallerRepositoryCore/SQLiteWrapper.h +++ b/src/AppInstallerRepositoryCore/SQLiteWrapper.h @@ -32,20 +32,23 @@ namespace AppInstaller::Repository::SQLite namespace details { + template + constexpr bool dependent_false = false; + template struct ParameterSpecificsImpl { static T& ToLog(T&&) { - static_assert(false, "No type specific override has been supplied"); + static_assert(dependent_false, "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, "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, "No type specific override has been supplied"); } };