diff --git a/components/misc/notnullptr.hpp b/components/misc/notnullptr.hpp index a7e02c3614..5b0bd92c14 100644 --- a/components/misc/notnullptr.hpp +++ b/components/misc/notnullptr.hpp @@ -11,7 +11,7 @@ namespace Misc class NotNullPtr { public: - NotNullPtr(T* value) + constexpr NotNullPtr(T* value) noexcept : mValue(value) { assert(mValue != nullptr); @@ -19,11 +19,11 @@ namespace Misc NotNullPtr(std::nullptr_t) = delete; - operator T*() const { return mValue; } + constexpr operator T*() const noexcept { return mValue; } - T* operator->() const { return mValue; } + constexpr T* operator->() const noexcept { return mValue; } - T& operator*() const { return *mValue; } + constexpr T& operator*() const noexcept { return *mValue; } private: T* mValue;