Add 3 variants of apply*() functions that invoke a given callable with the supplied arguments and the stored JSON value. * void apply(Fn, Args...): ... * void apply_cb(ResultCallback, Fn, Args...): ... * R apply_r(Fn, Args...): ...
25 lines
343 B
C++
25 lines
343 B
C++
#pragma once
|
|
|
|
namespace nlohmann
|
|
{
|
|
namespace detail
|
|
{
|
|
|
|
template<int I>
|
|
struct placeholder_t
|
|
{
|
|
static constexpr int value = I;
|
|
|
|
explicit placeholder_t() = default;
|
|
};
|
|
|
|
} // namespace detail
|
|
|
|
namespace placeholders
|
|
{
|
|
|
|
static constexpr detail::placeholder_t < -1 > basic_json_value{};
|
|
|
|
} // namespace placeholders
|
|
} // namespace nlohmann
|