MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / get_ref_impl

Function get_ref_impl

examples/server/json.hpp:20688–20699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20686 */
20687 template<typename ReferenceType, typename ThisType>
20688 static ReferenceType get_ref_impl(ThisType& obj)
20689 {
20690 // delegate the call to get_ptr<>()
20691 auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
20692
20693 if (JSON_HEDLEY_LIKELY(ptr != nullptr))
20694 {
20695 return *ptr;
20696 }
20697
20698 JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
20699 }
20700
20701 public:
20702 /// @name value access

Callers

nothing calls this directly

Calls 2

createFunction · 0.85
concatFunction · 0.85

Tested by

no test coverage detected