Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
value_from (2 of 2 overloads)

Convert an object of type T to value.

Synopsis

Defined in header <boost/json/value_from.hpp>

template<
    class T>
void
value_from(
    T&& t,
    value& jv);
Description

This function attempts to convert an object of type T to value using

In all cases, the conversion is done by calling an overload of tag_invoke found by argument-dependent lookup. Its signature should be similar to:

void tag_invoke( value_from_tag, value&, T );
Exception Safety

Strong guarantee.

Template Parameters

Type

Description

T

The type of the object to convert.

Parameters

Name

Description

t

The object to convert.

jv

value out parameter.

See Also

value_from_tag, value_to, tag_invoke: A general pattern for supporting customisable functions

Convenience header <boost/json.hpp>


PrevUpHomeNext