File tree 3 files changed +12
-16
lines changed
3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,7 @@ namespace detail
71
71
constexpr auto glaze_tuple_pairs (std::index_sequence<ix...>)
72
72
{
73
73
return std::tuple_cat (
74
- std::make_tuple (
75
- enum_name_at_index<enumeration_type>(ix), enum_value_at_index<enumeration_type>(ix)
76
- )...
74
+ std::make_tuple (enum_name_at_index<enumeration_type>(ix), enum_value_at_index<enumeration_type>(ix))...
77
75
);
78
76
}
79
77
@@ -87,13 +85,6 @@ namespace detail
87
85
} // namespace detail
88
86
} // namespace simple_enum::inline v0_8
89
87
90
- namespace simple_enum ::inline v0_8::concepts
91
- {
92
- using glz::read_json_supported;
93
- using glz::write_json_supported;
94
-
95
- } // namespace simple_enum::inline v0_8::concepts
96
-
97
88
namespace glz
98
89
{
99
90
template <simple_enum::bounded_enum enumeration_type>
@@ -131,8 +122,9 @@ struct from_json<enumeration_type>
131
122
if (bool (ctx.error )) [[unlikely]]
132
123
return ;
133
124
134
- simple_enum::expected<enumeration_type, simple_enum::enum_cast_error> res{simple_enum::enum_cast<enumeration_type>(value
135
- )};
125
+ simple_enum::expected<enumeration_type, simple_enum::enum_cast_error> res{
126
+ simple_enum::enum_cast<enumeration_type>(value)
127
+ };
136
128
if (!res.has_value ()) [[unlikely]]
137
129
{
138
130
ctx.error = error_code::syntax_error;
Original file line number Diff line number Diff line change 6
6
#include < concepts>
7
7
#include < type_traits>
8
8
9
- #define SIMPLE_ENUM_NAME_VERSION " 0.8.11 "
9
+ #define SIMPLE_ENUM_NAME_VERSION " 0.8.12 "
10
10
11
11
namespace simple_enum ::inline v0_8
12
12
{
Original file line number Diff line number Diff line change @@ -28,9 +28,13 @@ consteval auto adl_enum_bounds(test_enum_e)
28
28
using enum test_enum_e;
29
29
return simple_enum::adl_info{foo, baz};
30
30
}
31
-
32
- static_assert (simple_enum::concepts::read_json_supported<test_enum_e>);
33
- static_assert (simple_enum::concepts::write_json_supported<test_enum_e>);
31
+ #ifdef glaze_v5_0_0_generic_supported
32
+ static_assert (glz::read_supported<glz::JSON, test_enum_e>);
33
+ static_assert (glz::write_supported<glz::JSON, test_enum_e>);
34
+ #else
35
+ static_assert (glz::read_json_supported<test_enum_e>);
36
+ static_assert (glz::write_json_supported<test_enum_e>);
37
+ #endif
34
38
35
39
struct test_data_t
36
40
{
You can’t perform that action at this time.
0 commit comments