aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/util')
-rw-r--r--src/crepe/util/OptionalRef.h11
-rw-r--r--src/crepe/util/OptionalRef.hpp24
2 files changed, 1 insertions, 34 deletions
diff --git a/src/crepe/util/OptionalRef.h b/src/crepe/util/OptionalRef.h
index 0a94ae5..57f9635 100644
--- a/src/crepe/util/OptionalRef.h
+++ b/src/crepe/util/OptionalRef.h
@@ -36,7 +36,7 @@ public:
*
* \param ref Reference to assign
*/
- void set(T &) noexcept;
+ void set(T & ref) noexcept;
/**
* \brief Retrieve this reference
*
@@ -50,15 +50,6 @@ public:
*/
void clear() noexcept;
- //! Copy constructor
- OptionalRef(const OptionalRef<T> &);
- //! Move constructor
- OptionalRef(OptionalRef<T> &&);
- //! Copy assignment
- OptionalRef<T> & operator=(const OptionalRef<T> &);
- //! Move assignment
- OptionalRef<T> & operator=(OptionalRef<T> &&);
-
private:
/**
* \brief Reference to the value of type \c T
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");