diff options
| author | Julian Andres Klode <jak@debian.org> | 2025-03-14 08:29:50 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-03-14 08:29:50 +0000 |
| commit | d010239daab81ca027be332f1b5372eaf9dbbeb6 (patch) | |
| tree | 7e85a693b39feb8a58c0232d7920c1e0eed1b598 /apt-pkg | |
| parent | db5267cc17b3b2e6ded25da60adc030124950ae4 (diff) | |
| parent | f866dac363c6a22fe1b35baddf126b39a405410e (diff) | |
Merge branch 'indextargets-signed-by' into 'main'
apt-pkg/solver3.h: avoid static_assert(false) and signed-by in apt-get indextargets
See merge request apt-team/apt!464
Diffstat (limited to 'apt-pkg')
| -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]{}; } |
