@@ -20,34 +20,102 @@ namespace json {
2020
2121/* * Invoke a function object with the contents of a @ref value
2222
23+ Invokes `v` as if by `std::forward<Visitor>(v)( X )`, where `X` is
24+
25+ @li `jv.get_array()` if `jv.is_array()`, or
26+
27+ @li `jv.get_object()` if `jv.is_object()`, or
28+
29+ @li `jv.get_string()` if `jv.is_string()`, or
30+
31+ @li `jv.get_int64()` if `jv.is_int64()`, or
32+
33+ @li `jv.get_uint64()` if `jv.is_uint64()`, or
34+
35+ @li `jv.get_double()` if `jv.is_double()`, or
36+
37+ @li `jv.get_bool()` if `jv.is_bool()`, or
38+
39+ @li reference to an object of type `std::nullptr_t` if `jv.is_null()`.
40+
2341 @return The value returned by Visitor.
2442
2543 @param v The visitation function to invoke
2644
2745 @param jv The value to visit.
2846*/
29- /* * @{ */
3047template <class Visitor >
3148auto
3249visit (
3350 Visitor&& v,
3451 value& jv) -> decltype (
3552 static_cast <Visitor&&>(v)( std::declval<std::nullptr_t &>() ) );
3653
54+ /* * Invoke a function object with the contents of a @ref value
55+
56+ Invokes `v` as if by `std::forward<Visitor>(v)( X )`, where `X` is
57+
58+ @li `jv.get_array()` if `jv.is_array()`, or
59+
60+ @li `jv.get_object()` if `jv.is_object()`, or
61+
62+ @li `jv.get_string()` if `jv.is_string()`, or
63+
64+ @li `jv.get_int64()` if `jv.is_int64()`, or
65+
66+ @li `jv.get_uint64()` if `jv.is_uint64()`, or
67+
68+ @li `jv.get_double()` if `jv.is_double()`, or
69+
70+ @li `jv.get_bool()` if `jv.is_bool()`, or
71+
72+ @li reference to an object of type `const std::nullptr_t` if `jv.is_null()`.
73+
74+ @return The value returned by Visitor.
75+
76+ @param v The visitation function to invoke
77+
78+ @param jv The value to visit.
79+ */
3780template <class Visitor >
3881auto
3982visit (
4083 Visitor &&v,
4184 value const &jv) -> decltype (
4285 static_cast <Visitor&&>(v)( std::declval<std::nullptr_t const &>() ) );
4386
87+ /* * Invoke a function object with the contents of a @ref value
88+
89+ Invokes `v` as if by `std::forward<Visitor>(v)( X )`, where `X` is
90+
91+ @li `std::move( jv.get_array() )` if `jv.is_array()`, or
92+
93+ @li `std::move( jv.get_object() )` if `jv.is_object()`, or
94+
95+ @li `std::move( jv.get_string() )` if `jv.is_string()`, or
96+
97+ @li `std::move( jv.get_int64() )` if `jv.is_int64()`, or
98+
99+ @li `std::move( jv.get_uint64() )` if `jv.is_uint64()`, or
100+
101+ @li `std::move( jv.get_double() )` if `jv.is_double()`, or
102+
103+ @li `std::move( jv.get_bool() )` if `jv.is_bool()`, or
104+
105+ @li `std::nullptr_t()` if `jv.is_null()`.
106+
107+ @return The value returned by Visitor.
108+
109+ @param v The visitation function to invoke
110+
111+ @param jv The value to visit.
112+ */
44113template <class Visitor >
45114auto
46115visit (
47116 Visitor &&v,
48117 value&& jv) -> decltype (
49118 static_cast <Visitor&&>(v)( std::declval<std::nullptr_t &&>() ) );
50- /* * @} */
51119
52120} // namespace json
53121} // namespace boost
0 commit comments