rapidyaml 0.15.2
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 4109 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 4112 of file quickstart.cpp.

4113 {
4114 CHECK(map_member.size() == that.map_member.size());
4115 if(map_member.size() == that.map_member.size())
4116 {
4117 for(auto const& itthat : that.map_member)
4118 {
4119 auto it = map_member.find(itthat.first);
4120 CHECK(it != map_member.end());
4121 if(it != map_member.end())
4122 CHECK(it->second == itthat.second);
4123 }
4124 }
4125 }
#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 4111 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/latest/samples/quickstart.cpp