@@ -74,7 +74,10 @@ struct value_t
7474
7575 // / type-erased shared_ptr<Type>, not json deserializable.
7676 // / Pass ptr via any_t and specify it directly in the handler.
77- any_t
77+ any_t ,
78+
79+ // / Embeds json DOM.
80+ json_t
7881 >;
7982
8083 // / Explicit initialization constructors.
@@ -96,6 +99,8 @@ struct value_t
9699 value_t (uint16_t value) NOEXCEPT : inner_{ value } {}
97100 value_t (uint32_t value) NOEXCEPT : inner_{ value } {}
98101 value_t (uint64_t value) NOEXCEPT : inner_{ value } {}
102+ value_t (const json_t & value) NOEXCEPT : inner_{ value } {}
103+ value_t (json_t && value) NOEXCEPT : inner_{ std::move (value) } {}
99104 value_t (const any_t & value) NOEXCEPT : inner_{ value } {}
100105 value_t (any_t && value) NOEXCEPT : inner_{ std::move (value) } {}
101106
@@ -115,6 +120,7 @@ struct value_t
115120 ALTERNATIVE_VARIANT_ASSIGNMENT (value_t , uint16_t , inner_)
116121 ALTERNATIVE_VARIANT_ASSIGNMENT (value_t , uint32_t , inner_)
117122 ALTERNATIVE_VARIANT_ASSIGNMENT (value_t , uint64_t , inner_)
123+ ALTERNATIVE_VARIANT_ASSIGNMENT (value_t , json_t , inner_)
118124 ALTERNATIVE_VARIANT_ASSIGNMENT (value_t , any_t , inner_)
119125
120126 inner_t & value () NOEXCEPT
0 commit comments