Struct value_accept< T, Ts... >

Synopsis

#include <include/cpptoml.h>

template <class T, class... Ts>
struct value_accept<T, Ts...>

Description

No description yet.

Methods

accept

Source

Lines 3247-3263 in include/cpptoml.h.

template <class T, class... Ts>
struct value_accept<T, Ts...>
{
    template <class Visitor, class... Args>
    static void accept(const base& b, Visitor&& visitor, Args&&... args)
    {
        if (auto v = b.as<T>())
        {
            visitor.visit(*v, std::forward<Args>(args)...);
        }
        else
        {
            value_accept<Ts...>::accept(b, std::forward<Visitor>(visitor),
                                        std::forward<Args>(args)...);
        }
    }
};





Add Discussion as Guest

Log in