This is not the return value that is const'ed,
but just shows that this method does not change the object.
T& get() { return value_; }
T const& get() const { return value_; }
T& get() { return value_; }
T const& get() const { return value_; }
- std::string get_name() { return name_; }
+ std::string get_name() const { return name_; }
// Implicit conversion to the underlying type:
operator T&() { return value_; }
operator T const&() const{ return value_; }
// Implicit conversion to the underlying type:
operator T&() { return value_; }
operator T const&() const{ return value_; }