summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-04-26 18:13:19 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-04-26 18:13:19 +0200
commit3824e0c49c7c43ac99d4f871d8404559070d7049 (patch)
tree2c4a353e2ee8cc09665e4587d00622334c6fc537 /apt-pkg/pkgcache.h
parent0bf9d85862771fcbed5b30c3eac288c856d588c7 (diff)
Add correct std namespace to nullptr_t
Reported-By: clangd Gbp-Dch: Ignore
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index d2e2f432e..6c6a4664e 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -99,7 +99,7 @@ template <typename T> class map_pointer {
uint32_t val;
public:
map_pointer() noexcept : val(0) {}
- map_pointer(nullptr_t) noexcept : val(0) {}
+ map_pointer(std::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; }
@@ -111,8 +111,8 @@ template<typename T> inline bool operator !=(map_pointer<T> u, map_pointer<T> m)
template<typename T> inline bool operator <(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) < uint32_t(m); }
template<typename T> inline bool operator >(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) > uint32_t(m); }
template<typename T> inline uint32_t operator -(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) - uint32_t(m); }
-template<typename T> bool operator ==(map_pointer<T> m, nullptr_t) { return uint32_t(m) == 0; }
-template<typename T> bool operator !=(map_pointer<T> m, nullptr_t) { return uint32_t(m) != 0; }
+template<typename T> bool operator ==(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) == 0; }
+template<typename T> bool operator !=(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) != 0; }
// same as the previous, but documented to be to a string item
typedef map_pointer<char> map_stringitem_t;