rapidyaml 0.16.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
my_map_type< K, V > Struct Template Reference

example user container type: map-like More...

Public Member Functions

void check_eq (my_map_type const &that) const

Public Attributes

std::map< K, V > map_member

Detailed Description

template<class K, class V>
struct my_map_type< K, V >

example user container type: map-like

Definition at line 4190 of file quickstart.cpp.

Member Function Documentation

◆ check_eq()

template<class K, class V>
void my_map_type< K, V >::check_eq ( my_map_type< K, V > const & that) const
inline

Definition at line 4193 of file quickstart.cpp.

4194 {
4195 CHECK(map_member.size() == that.map_member.size());
4196 if(map_member.size() == that.map_member.size())
4197 {
4198 for(auto const& itthat : that.map_member)
4199 {
4200 auto it = map_member.find(itthat.first);
4201 CHECK(it != map_member.end());
4202 if(it != map_member.end())
4203 CHECK(it->second == itthat.second);
4204 }
4205 }
4206 }
#define CHECK(predicate)
a testing assertion, used only in this quickstart
example user container type: map-like
std::map< K, V > map_member

Member Data Documentation

◆ map_member

template<class K, class V>
std::map<K, V> my_map_type< K, V >::map_member

Definition at line 4192 of file quickstart.cpp.

Referenced by check_eq(), read(), and write().


The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/rapidyaml/checkouts/v0.16.0/samples/quickstart.cpp