Struct value_traits< T, typename std::enable_if< valid_value_or_string_convertible< T >::value >::type >

Synopsis

#include <include/cpptoml.h>

template <class T>
struct value_traits<T, typename std::enable_if<
                           valid_value_or_string_convertible<T>::value>::type>

Description

No description yet.

Methods

construct

Source

Lines 298-312 in include/cpptoml.h.

template <class T>
struct value_traits<T, typename std::enable_if<
                           valid_value_or_string_convertible<T>::value>::type>
{
    using value_type = typename std::conditional<
        valid_value<typename std::decay<T>::type>::value,
        typename std::decay<T>::type, std::string>::type;

    using type = value<value_type>;

    static value_type construct(T&& val)
    {
        return value_type(val);
    }
};





Add Discussion as Guest

Log in