#include #include #include #include #include #include "write_and_read.hpp" void test_one_of() { std::cout << "test_one_of" << std::endl; using Age = rfl::Validator< unsigned int, rfl::OneOf, rfl::Maximum<10>>, rfl::AllOf, rfl::Maximum<130>>>>; struct Person { rfl::Field<"firstName", std::string> first_name; rfl::Field<"lastName", std::string> last_name; rfl::Field<"age", Age> age; }; const auto homer = Person{.first_name = "Homer", .last_name = "Simpson", .age = 45}; write_and_read(homer, R"({"firstName":"Homer","lastName":"Simpson","age":45})"); }