We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d15ad8 commit 89d52e3Copy full SHA for 89d52e3
1 file changed
include/MGIS/Utilities/OptionalReference.hxx
@@ -22,7 +22,7 @@ namespace mgis {
22
* \brief a class that may contain a reference to a class
23
*
24
* \note this class was introduced by of the lack of optional
25
- * references befor to C++-26.
+ * references prior to C++-26.
26
* \note the design of the class is loosely modeled by the
27
* std::experimental::observer_ptr proposal
28
*/
@@ -66,6 +66,10 @@ namespace mgis {
66
67
constexpr pointer operator->() const noexcept { return this->ptr; }
68
69
+ [[nodiscard]] constexpr bool has_value() const noexcept {
70
+ return this->ptr != nullptr;
71
+ }
72
+
73
[[nodiscard]] constexpr operator bool() const noexcept {
74
return this->ptr != nullptr;
75
}
0 commit comments