mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🐛 fix returning reference to local temporary object #2064
This commit is contained in:
@ -18243,6 +18243,18 @@ class basic_json
|
||||
return is_binary() ? m_value.binary : nullptr;
|
||||
}
|
||||
|
||||
/// get a pointer to the value (binary)
|
||||
internal_binary_t* get_impl_ptr(internal_binary_t* /*unused*/) noexcept
|
||||
{
|
||||
return is_binary() ? m_value.binary : nullptr;
|
||||
}
|
||||
|
||||
/// get a pointer to the value (binary)
|
||||
constexpr const internal_binary_t* get_impl_ptr(const internal_binary_t* /*unused*/) const noexcept
|
||||
{
|
||||
return is_binary() ? m_value.binary : nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
@brief helper function to implement get_ref()
|
||||
|
||||
|
Reference in New Issue
Block a user