19 bool has_value()
const {
return !m_value.empty(); };
24 throw std::logic_error(
"this object does not contain a value!\n");
32 std::vector<T> m_value;
A copyable read-only value.
Definition read_only.h:14
const T & get_value() const
Definition read_only.h:21
read_only()
Definition read_only.h:16
bool has_value() const
Definition read_only.h:19
read_only(const T &value)
Definition read_only.h:17
void operator=(const T &value)
Definition read_only.h:29
void test_read_only()
Test our read_only class.
Definition read_only.cpp:40