Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions include/flow/step.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,16 @@ template <stdx::ct_string Name> [[nodiscard]] constexpr auto milestone() {
}

inline namespace literals {
template <class T, T... Cs> [[nodiscard]] constexpr auto operator""_action() {
constexpr auto S = stdx::ct_string<sizeof...(Cs) + 1U>{{Cs..., 0}};
template <stdx::ct_string S> [[nodiscard]] constexpr auto operator""_action() {
return action<S>();
}

template <class T, T... Cs> [[nodiscard]] constexpr auto operator""_step() {
constexpr auto S = stdx::ct_string<sizeof...(Cs) + 1U>{{Cs..., 0}};
template <stdx::ct_string S> [[nodiscard]] constexpr auto operator""_step() {
return action<S>();
}

template <class T, T... Cs>
template <stdx::ct_string S>
[[nodiscard]] constexpr auto operator""_milestone() {
constexpr auto S = stdx::ct_string<sizeof...(Cs) + 1U>{{Cs..., 0}};
return milestone<S>();
}
} // namespace literals
Expand Down
10 changes: 6 additions & 4 deletions include/msg/message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,13 @@ template <typename Name> struct field_name {
} // namespace detail

inline namespace literals {
template <class T, T... chars> constexpr auto operator""_field() {
return detail::field_name<sc::string_constant<T, chars...>>{};
template <stdx::ct_string S> constexpr auto operator""_field() {
using Name = decltype(stdx::ct_string_to_type<S, sc::string_constant>());
return detail::field_name<Name>{};
}
template <class T, T... chars> constexpr auto operator""_f() {
return detail::field_name<sc::string_constant<T, chars...>>{};
template <stdx::ct_string S> constexpr auto operator""_f() {
using Name = decltype(stdx::ct_string_to_type<S, sc::string_constant>());
return detail::field_name<Name>{};
}
} // namespace literals

Expand Down