22 #ifndef LIB_OPTIONAL_REF_H 23 #define LIB_OPTIONAL_REF_H 30 using LERR_(BOTTOM_VALUE);
74 explicit operator bool()
const {
return isValid(); }
82 , LERR_(BOTTOM_VALUE));
111 points_to (T
const& target)
const 120 return r1.ref_ == r2.ref_;
125 return r1.ref_ != r2.ref_;
132 return ref() == otherTarget;
135 friend bool operator== (T
const& otherTarget,
OptionalRef const& ref) {
return ref == otherTarget; }
136 friend bool operator!= (T
const& otherTarget,
OptionalRef const& ref) {
return !(ref == otherTarget); }
137 friend bool operator!= (
OptionalRef const& ref, T
const& otherTarget) {
return !(ref == otherTarget); }
143 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).