Adding derference operator to not_null (#513)
This commit is contained in:
1 parent
d1032864aa
commit
23581d4d63
2 files changed
+16
No files matched your search
@@ -98,6 +98,7 @@ public:
|
||||
|
||||
constexpr operator T() const { return get(); }
|
||||
constexpr T operator->() const { return get(); }
|
||||
constexpr auto operator*() const { return *get(); }
|
||||
|
||||
// prevents compilation when someone attempts to assign a null pointer constant
|
||||
not_null(std::nullptr_t) = delete;
|
||||
|
||||
Reference in new issue
Block a user