Function value_or

Synopsis

#include <include/cpptoml.h>

template <class U>
T value_or(U &&alternative) const

Description

No description yet.

Mentioned in

Source

Lines 87-93 in include/cpptoml.h.

template <class U>
T value_or(U&& alternative) const
{
    if (!empty_)
        return value_;
    return static_cast<T>(std::forward<U>(alternative));
}





Add Discussion as Guest

Log in