diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:01:04 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-21 10:01:04 +0100 |
commit | 115d6f50152dc018073345800ca90b85846ebaa9 (patch) | |
tree | 2a260e1a280f170d26ef41519677ca04483d5596 /src/crepe/util | |
parent | e7facf23888c38e09128749822c8e7d2b1d7e2fe (diff) |
Diffstat (limited to 'src/crepe/util')
-rw-r--r-- | src/crepe/util/OptionalRef.h | 2 | ||||
-rw-r--r-- | src/crepe/util/OptionalRef.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/util/OptionalRef.h b/src/crepe/util/OptionalRef.h index 253bc07..3201667 100644 --- a/src/crepe/util/OptionalRef.h +++ b/src/crepe/util/OptionalRef.h @@ -31,7 +31,7 @@ public: * * \throws std::runtime_error if this function is called while the reference it not set */ - operator T & () const; + operator T &() const; /** * \brief Check if this reference is not empty * 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; |