Function operator>>

Summary

#include <src/c4/yml/node.hpp>

(1) template <class T>
    NodeRef const  & operator>>(T &v) const

(2) template <class T>
    NodeRef const  & operator>>(Key< T > v) const

Function overload

Synopsis

#include <src/c4/yml/node.hpp>

template <class T>
NodeRef const  & operator>>(T &v) const

Description

No description yet.

Source

Lines 419-430 in src/c4/yml/node.hpp.

template<class T>
inline NodeRef const& operator>> (T &v) const
{
    RYML_ASSERT( ! is_seed());
    RYML_ASSERT(valid());
    RYML_ASSERT(get() != nullptr);
    if( ! read(*this, &v))
    {
        c4::yml::error("could not parse value");
    }
    return *this;
}

Synopsis

#include <src/c4/yml/node.hpp>

template <class T>
NodeRef const  & operator>>(Key< T > v) const

Description

No description yet.

Source

Lines 432-440 in src/c4/yml/node.hpp.

template<class T>
inline NodeRef const& operator>> (Key<T> v) const
{
    RYML_ASSERT( ! is_seed());
    RYML_ASSERT(valid());
    RYML_ASSERT(get() != nullptr);
    from_chars(key(), &v.k);
    return *this;
}





Add Discussion as Guest

Log in