diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-20 14:24:08 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-20 14:24:08 +0100 |
commit | 22a7e9f3c40b4b6eb68a5343e4870e76c4bfcf63 (patch) | |
tree | b927a520d1d25951a7b22ade23b470168db67a72 /src/crepe/util/OptionalRef.hpp | |
parent | 02845c3d25130e9473604cb2eeee42a7a7a8eadf (diff) |
process feedback on #39
Diffstat (limited to 'src/crepe/util/OptionalRef.hpp')
-rw-r--r-- | src/crepe/util/OptionalRef.hpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/crepe/util/OptionalRef.hpp b/src/crepe/util/OptionalRef.hpp index ee41f61..71e2a39 100644 --- a/src/crepe/util/OptionalRef.hpp +++ b/src/crepe/util/OptionalRef.hpp @@ -12,30 +12,6 @@ OptionalRef<T>::OptionalRef(T & ref) { } template <typename T> -OptionalRef<T>::OptionalRef(const OptionalRef<T> & other) { - this->ref = other.ref; -} - -template <typename T> -OptionalRef<T>::OptionalRef(OptionalRef<T> && other) { - this->ref = other.ref; - other.clear(); -} - -template <typename T> -OptionalRef<T> & OptionalRef<T>::operator=(const OptionalRef<T> & other) { - this->ref = other.ref; - return *this; -} - -template <typename T> -OptionalRef<T> & OptionalRef<T>::operator=(OptionalRef<T> && other) { - this->ref = other.ref; - other.clear(); - return *this; -} - -template <typename T> T & OptionalRef<T>::get() const { if (this->ref == nullptr) throw std::runtime_error("OptionalRef: attempt to dereference nullptr"); |