Template Struct prepared< T, true >

Struct Documentation

template<typename T>
struct udho::prepared<T, true>

Public Types

typedef T derived_type
typedef std::result_of<decltype(&derived_type::index)(const derived_type*)>::type index_type
typedef detail::association_group_visitor<index_type> visitor_type

Public Functions

prepared(const derived_type &data)
prepared(const prepared<T, true> &other)

a visitor keeps a reference to the index, So while copy constructing if the other object is going to be destructed then the copied visitor will have a dangling reference to the other._index hence the copy constructor instantiates a visitor again from the copied index

template<typename V>
V extract(const std::string &key, bool *okay = 0x0) const
template<typename V>
V parse(const std::string &key, bool *okay = 0x0) const
std::string stringify(const std::string &key, bool *okay = 0x0) const
template<typename V>
V at(const std::string &key, bool *okay = 0x0) const
std::string operator[](const std::string &key) const
std::size_t count(const std::string &key) const
std::vector<std::string> keys(const std::string &key) const

Public Members

const derived_type &_data
index_type _index
visitor_type _visitor