boost::text::optional_ref
// In header: <boost/text/trie.hpp> template<typename T, bool Const = std::is_const<T>::value> struct optional_ref { // construct/copy/destruct optional_ref(); optional_ref(T &); template<typename U> auto operator=(U &&); // public member functions explicit operator bool() const; explicit operator bool(); explicit operator bool(); T const & operator*() const; T const * operator->() const; operator T const &() const; operator T const &() const; T & operator*(); T * operator->(); operator T&(); operator T&(); };