diff options
Diffstat (limited to 'src/crepe/util/OptionalRef.hpp')
-rw-r--r-- | src/crepe/util/OptionalRef.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/util/OptionalRef.hpp b/src/crepe/util/OptionalRef.hpp index ae7c73e..4608c9e 100644 --- a/src/crepe/util/OptionalRef.hpp +++ b/src/crepe/util/OptionalRef.hpp @@ -12,7 +12,7 @@ OptionalRef<T>::OptionalRef(T & ref) { } template <typename T> -OptionalRef<T>::operator T & () const { +OptionalRef<T>::operator T &() const { if (this->ref == nullptr) throw std::runtime_error("OptionalRef: attempt to dereference nullptr"); return *this->ref; |