Function make_value

Synopsis

#include <include/cpptoml.h>

template <class T>
std::shared_ptr< typename value_traits< T >::type > make_value(T &&val)

Description

No description yet.

Source

Lines 670-677 in include/cpptoml.h. Line 394 in include/cpptoml.h.

template <class T>
std::shared_ptr<typename value_traits<T>::type> make_value(T&& val)
{
    using value_type = typename value_traits<T>::type;
    using enabler = typename value_type::make_shared_enabler;
    return std::make_shared<value_type>(
        enabler{}, value_traits<T>::construct(std::forward<T>(val)));
}





Add Discussion as Guest

Log in