Function as

Summary

#include <include/yaml-cpp/node/node.h>

(1) template <typename T>
    T as() const

(2) template <typename T, typename S>
    T as(const S &fallback) const

Function overload

Synopsis

#include <include/yaml-cpp/node/node.h>

template <typename T>
T as() const

Description

access

access functions

Mentioned in

Source

Lines 152-157 in include/yaml-cpp/node/impl.h. Line 66 in include/yaml-cpp/node/node.h.

template <typename T>
inline T Node::as() const {
  if (!m_isValid)
    throw InvalidNode(m_invalidKey);
  return as_if<T, void>(*this)();
}

Synopsis

#include <include/yaml-cpp/node/node.h>

template <typename T, typename S>
T as(const S &fallback) const

Description

No description yet.

Mentioned in

Source

Lines 159-164 in include/yaml-cpp/node/impl.h. Line 68 in include/yaml-cpp/node/node.h.

template <typename T, typename S>
inline T Node::as(const S& fallback) const {
  if (!m_isValid)
    return fallback;
  return as_if<T, S>(*this)(fallback);
}





Add Discussion as Guest

Log in