| 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 |