diff options
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r-- | apt-pkg/pkgcache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 288bcce09..d2e2f432e 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -102,6 +102,7 @@ public: map_pointer(nullptr_t) noexcept : val(0) {} explicit map_pointer(uint32_t n) noexcept : val(n) {} explicit operator uint32_t() noexcept { return val; } + explicit operator bool() noexcept { return val != 0; } }; template<typename T> inline T *operator +(T *p, map_pointer<T> m) { return p + uint32_t(m); } |