Skip to content

Commit 12f434a

Browse files
authored
Merge pull request #593 from elbeno/fix-udl-extension
🎨 Don't use nonstandard UDL extension
2 parents c7186ba + 3b6e076 commit 12f434a

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

include/flow/step.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,16 @@ template <stdx::ct_string Name> [[nodiscard]] constexpr auto milestone() {
5858
}
5959

6060
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() {
6362
return action<S>();
6463
}
6564

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() {
6866
return action<S>();
6967
}
7068

71-
template <class T, T... Cs>
69+
template <stdx::ct_string S>
7270
[[nodiscard]] constexpr auto operator""_milestone() {
73-
constexpr auto S = stdx::ct_string<sizeof...(Cs) + 1U>{{Cs..., 0}};
7471
return milestone<S>();
7572
}
7673
} // namespace literals

include/msg/message.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@ template <typename Name> struct field_name {
171171
} // namespace detail
172172

173173
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>{};
176177
}
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>{};
179181
}
180182
} // namespace literals
181183

0 commit comments

Comments
 (0)