MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / get_ref_impl

Function get_ref_impl

Source/Utils/json.hpp:19300–19311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19298 */
19299 template<typename ReferenceType, typename ThisType>
19300 static ReferenceType get_ref_impl(ThisType& obj)
19301 {
19302 // delegate the call to get_ptr<>()
19303 auto ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
19304
19305 if (JSON_HEDLEY_LIKELY(ptr != nullptr))
19306 {
19307 return *ptr;
19308 }
19309
19310 JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name())));
19311 }
19312
19313 public:
19314 /// @name value access

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
type_nameMethod · 0.80

Tested by

no test coverage detected