File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
tests/json_reflection_test Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ namespace glz
377377
378378 template <class T >
379379 concept glaze_enum_t = glaze_t <T> && is_specialization_v<meta_wrapper_t <T>, detail::Enum>;
380-
380+
381381 template <class T >
382382 concept is_named_enum = ((glaze_enum_t <T> || (meta_keys<T> && std::is_enum_v<T>)) && !custom_read<T>);
383383
Original file line number Diff line number Diff line change @@ -882,36 +882,31 @@ suite custom_holder_tests = [] {
882882 };
883883};
884884
885- enum struct some_enum
886- {
887- one,
888- two,
889- three
890- };
885+ enum struct some_enum { one, two, three };
891886
892887template <>
893- struct glz ::meta<some_enum> {
888+ struct glz ::meta<some_enum>
889+ {
894890 using enum some_enum;
895891 static constexpr auto value = enumerate(one, two, three);
896892};
897893
898894struct struct_with_a_pair
899895{
900896 std::pair<some_enum, std::string> value{};
901-
897+
902898 constexpr bool operator <=>(const struct_with_a_pair& rhs) const = default ;
903899};
904900
905- suite enum_pair_tests = []
906- {
901+ suite enum_pair_tests = [] {
907902 " enum pair" _test = [] {
908903 struct_with_a_pair obj{};
909904 std::string buffer{};
910905 expect (not glz::write_json (obj, buffer));
911906 expect (buffer == R"( {"value":{"one":""}})" ) << buffer;
912-
907+
913908 buffer = R"( {"value":{"two":"message"}})" ;
914-
909+
915910 expect (not glz::read_json (obj, buffer));
916911 expect (obj.value .first == some_enum::two);
917912 expect (obj.value .second == " message" );
You can’t perform that action at this time.
0 commit comments