diff options
| -rw-r--r-- | apt-pkg/solver3.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h index 1bdc13559..c2d6e035e 100644 --- a/apt-pkg/solver3.h +++ b/apt-pkg/solver3.h @@ -19,6 +19,8 @@ #include <apt-pkg/pkgcache.h> #include <apt-pkg/policy.h> +template <typename T> struct always_false : std::false_type {}; + namespace APT { @@ -49,7 +51,7 @@ class ContiguousCacheMap else if constexpr (std::is_same_v<K, pkgCache::Package>) size = cache.Head().PackageCount; else - static_assert(false, "Cannot construct map for key type"); + static_assert(always_false<K>::value, "Cannot construct map for key type"); data_ = new V[size]{}; } |
