31 #ifndef LIB_OPTIONAL_REF_H 32 #define LIB_OPTIONAL_REF_H 39 using LERR_(BOTTOM_VALUE);
83 explicit operator bool()
const {
return isValid(); }
91 , LERR_(BOTTOM_VALUE));
120 points_to (T
const& target)
const 129 return r1.ref_ == r2.ref_;
134 return r1.ref_ != r2.ref_;
141 return ref() == otherTarget;
144 friend bool operator== (T
const& otherTarget,
OptionalRef const& ref) {
return ref == otherTarget; }
145 friend bool operator!= (T
const& otherTarget,
OptionalRef const& ref) {
return !(ref == otherTarget); }
146 friend bool operator!= (
OptionalRef const& ref, T
const& otherTarget) {
return !(ref == otherTarget); }
152 optionalRefTo (T& target)
Optional or switchable link to an existing object.
Implementation namespace for support and library code.
Derived specific exceptions within Lumiera's exception hierarchy.
Lumiera error handling (C++ interface).