File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,16 @@ template <stdx::ct_string Name> [[nodiscard]] constexpr auto milestone() {
58
58
}
59
59
60
60
inline namespace literals {
61
- template <class T , T... Cs> [[nodiscard]] constexpr auto operator " " _action() {
62
- constexpr auto S = stdx::ct_string<sizeof ...(Cs) + 1U >{{Cs..., 0 }};
61
+ template <stdx::ct_string S> [[nodiscard]] constexpr auto operator " " _action() {
63
62
return action<S>();
64
63
}
65
64
66
- template <class T , T... Cs> [[nodiscard]] constexpr auto operator " " _step() {
67
- constexpr auto S = stdx::ct_string<sizeof ...(Cs) + 1U >{{Cs..., 0 }};
65
+ template <stdx::ct_string S> [[nodiscard]] constexpr auto operator " " _step() {
68
66
return action<S>();
69
67
}
70
68
71
- template <class T , T... Cs >
69
+ template <stdx::ct_string S >
72
70
[[nodiscard]] constexpr auto operator " " _milestone() {
73
- constexpr auto S = stdx::ct_string<sizeof ...(Cs) + 1U >{{Cs..., 0 }};
74
71
return milestone<S>();
75
72
}
76
73
} // namespace literals
Original file line number Diff line number Diff line change @@ -171,11 +171,13 @@ template <typename Name> struct field_name {
171
171
} // namespace detail
172
172
173
173
inline namespace literals {
174
- template <class T , T... chars> constexpr auto operator " " _field() {
175
- return detail::field_name<sc::string_constant<T, chars...>>{};
174
+ template <stdx::ct_string S> constexpr auto operator " " _field() {
175
+ using Name = decltype (stdx::ct_string_to_type<S, sc::string_constant>());
176
+ return detail::field_name<Name>{};
176
177
}
177
- template <class T , T... chars> constexpr auto operator " " _f() {
178
- return detail::field_name<sc::string_constant<T, chars...>>{};
178
+ template <stdx::ct_string S> constexpr auto operator " " _f() {
179
+ using Name = decltype (stdx::ct_string_to_type<S, sc::string_constant>());
180
+ return detail::field_name<Name>{};
179
181
}
180
182
} // namespace literals
181
183
You can’t perform that action at this time.
0 commit comments