summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stdTypeDefs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdTypeDefs.h b/lib/stdTypeDefs.h
index beab630..38ebe0b 100644
--- a/lib/stdTypeDefs.h
+++ b/lib/stdTypeDefs.h
@@ -28,6 +28,18 @@ template<typename T> struct AnyPtr {
return *ptr;
}
+ // NOLINTNEXTLINE(hicpp-explicit-conversions)
+ operator bool() const
+ {
+ return ptr != nullptr;
+ }
+
+ bool
+ operator!() const
+ {
+ return ptr == nullptr;
+ }
+
private:
T * ptr;
};