Lines Matching defs:country
28 enum class country
57 country m_country{};
59 person(const age& a, name n, const country& c) : m_age(a), m_name(std::move(n)), m_country(c) {}
96 static void to_json(BasicJsonType& j, country c)
100 case country::china:
103 case country::france:
106 case country::russia:
117 j = BasicJsonType{{"age", p.m_age}, {"name", p.m_name}, {"country", p.m_country}};
185 static void from_json(const BasicJsonType& j, country& c)
188 const std::map<std::string, country> m =
190 {"中华人民共和国", country::china},
191 {"France", country::france},
192 {"Российская Федерация", country::russia}
205 p.m_country = j["country"].template get<country>();
235 const udt::country c{udt::country::france};
237 const udt::person senior_programmer{{42}, {"王芳"}, udt::country::china};
247 CHECK(json(sfinae_addict) == R"({"name":"theo", "age":23, "country":"France"})"_json);
250 R"({"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"})"_json);
254 R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json);
261 R"({"name":"C++", "contacts" : [{"person" : {"age":23, "name":"theo", "country":"France"}, "address":"Paris"}, {"person" : {"age":42, "country":"中华人民共和国", "name":"王芳"}, "address":"Paris"}]})"_json;
273 const auto country =
274 contact_json["person"]["country"].get<udt::country>();
279 CHECK(country == c);
312 const udt::country country = contact_json["person"]["country"];
317 CHECK(country == c);
395 optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-shared)
404 auto person = udt::person{{42}, {"John Doe"}, udt::country::russia};
508 optPerson.reset(new udt::person{{42}, {"John Doe"}, udt::country::russia}); // NOLINT(cppcoreguidelines-owning-memory,modernize-make-unique)
517 auto person = udt::person{{42}, {"John Doe"}, udt::country::russia};
682 auto me = udt::person{{23}, {"theo"}, udt::country::france};