json/include/nlohmann/detail/placeholders.hpp
Florian Albrechtskirchinger f898c19aca
Add apply*() functions (visitor pattern)
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...):
  ...
2022-05-03 21:35:51 +02:00

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