Skip to content

Commit

Permalink
Fixed issues preventing compilation on VS 2022 17.1. (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedieaston authored Mar 4, 2022
1 parent 5f9f6ec commit 92e662e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/AppInstallerCommonCore/Public/winget/Registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ namespace AppInstaller::Registry
{
namespace details
{
template<DWORD>
constexpr bool dependent_false = false;

template <DWORD Type>
struct ValueTypeSpecifics
{
using value_t = void;

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");
}
};

Expand Down
9 changes: 6 additions & 3 deletions src/AppInstallerRepositoryCore/SQLiteWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
};

Expand Down

0 comments on commit 92e662e

Please sign in to comment.