MCPcopy Create free account
hub / github.com/LBANN/lbann / readonly_reference

Class readonly_reference

include/lbann/utils/argument_parser.hpp:175–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected