MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / get_ref_impl

Function get_ref_impl

3rd/nlohmann_json/include/nlohmann/json.hpp:2960–2971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2958 */
2959 template<typename ReferenceType, typename ThisType>
2960 static ReferenceType get_ref_impl(ThisType& obj)
2961 {
2962 // delegate the call to get_ptr<>()
2963 auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
2964
2965 if (JSON_HEDLEY_LIKELY(ptr != nullptr))
2966 {
2967 return *ptr;
2968 }
2969
2970 JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()), obj));
2971 }
2972
2973 public:
2974 /// @name value access

Callers

nothing calls this directly

Calls 2

stringFunction · 0.85
createFunction · 0.70

Tested by

no test coverage detected