Function get_qualified_as
Synopsis
#include <include/cpptoml.h>
template <class T>
option< T > get_qualified_as(const std::string &key) const
Description
Helper function that attempts to get a value corresponding to the template parameter from a given key. Will resolve "qualified keys".
Mentioned in
- Getting Started / Nested Tables
Source
Lines 1458-1469 in include/cpptoml.h.
template <class T>
option<T> get_qualified_as(const std::string& key) const
{
try
{
return get_impl<T>(get_qualified(key));
}
catch (const std::out_of_range&)
{
return {};
}
}