9 template <
class T>
class Value {
20 operator T()
const {
return data.first; }
25 operator T&() {
return data.first; }
53 bool set()
const {
return data.second; }
59 bool&
set() {
return data.second; }
68 inline std::ostream& operator<<(std::ostream& s, const msp::Value<T>& val) {
std::pair< T, bool > data
T operator()() const
Gets a copy of the data.
T & operator()()
Gets a reference to the internal data.
Value< T > & operator=(const T rhs)
Assignment operator for non-Value objects.
std::ostream & operator<<(std::ostream &s, const msp::Value< T > &val)
bool set() const
Queries if the data has been set.
Value< T > & operator=(const Value< T > &rhs)=default
Copy assignment operator.