| 173 | */ |
| 174 | template <typename T> |
| 175 | class readonly_reference |
| 176 | { |
| 177 | public: |
| 178 | readonly_reference(T& val) noexcept : ref_(val) {} |
| 179 | T const& get() const noexcept { return ref_; } |
| 180 | operator T const&() const noexcept { return this->get(); } |
| 181 | |
| 182 | template <typename S> |
| 183 | bool operator==(S const& y) const noexcept |
| 184 | { |
| 185 | return this->get() == y; |
| 186 | } |
| 187 | |
| 188 | private: |
| 189 | T& ref_; |
| 190 | }; // class readonly_reference<T> |
| 191 | |
| 192 | /** @class parse_error |
| 193 | * @brief std::exception subclass that is thrown if the parser |