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 a snapshot of the master branch, built from commit f3371a53c4.
PrevUpHomeNext
value_to (3 of 3 overloads)

Convert a value to an object of type T.

Synopsis

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

template<
    class T,
    class U>
T
value_to(
    U const& jv) = delete;
Description

This overload is deleted and participates in overload resolution only when U is not value. The overload exists to prevent unintented creation of temporary value instances, e.g.

auto flag = value_to<bool>( true );

Convenience header <boost/json.hpp>


PrevUpHomeNext