Skip to content

Commit 8051143

Browse files
authored
Merge pull request #795 from elbeno/update-stdx
⬆️ Update stdx
2 parents 4e15633 + 61bdbff commit 8051143

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ include(cmake/string_catalog.cmake)
2424

2525
add_versioned_package("gh:boostorg/mp11#boost-1.83.0")
2626
fmt_recipe(11.1.3)
27-
add_versioned_package("gh:intel/cpp-baremetal-concurrency#09c043b")
28-
add_versioned_package("gh:intel/cpp-std-extensions#ca9e67a")
27+
add_versioned_package("gh:intel/cpp-baremetal-concurrency#de60a38")
28+
add_versioned_package("gh:intel/cpp-std-extensions#a1ae0b4")
2929
add_versioned_package("gh:intel/cpp-baremetal-senders-and-receivers#27db6e1")
3030

3131
set(GEN_STR_CATALOG

include/flow/graph_builder.hpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ template <typename CTNode, typename Output>
3030
concept is_output_compatible = requires(CTNode n) {
3131
{ Output::create_node(n) } -> std::same_as<typename Output::node_t>;
3232
};
33+
34+
template <typename T>
35+
constexpr static auto error_steps =
36+
T{}.join(stdx::cts_t<"">{}, [](auto x, auto y) {
37+
using namespace stdx::literals;
38+
return x + ", "_ctst + y;
39+
});
3340
} // namespace detail
3441

3542
template <typename T> using name_for = typename T::name_t;
@@ -165,13 +172,6 @@ struct graph_builder {
165172
return std::optional<Output>{std::in_place, span_t{ordered_list}};
166173
}
167174

168-
template <typename T>
169-
constexpr static auto error_steps =
170-
T{}.join(stdx::cts_t<"">{}, [](auto x, auto y) {
171-
using namespace stdx::literals;
172-
return x + ", "_ctst + y;
173-
});
174-
175175
// NOLINTNEXTLINE (readability-function-cognitive-complexity)
176176
constexpr static void check_for_missing_nodes(auto nodes,
177177
auto mentioned_nodes) {
@@ -186,24 +186,22 @@ struct graph_builder {
186186
using missing_nodes_t =
187187
boost::mp11::mp_set_difference<mentioned_node_names_t,
188188
node_names_t>;
189-
constexpr auto missing_nodes = error_steps<missing_nodes_t>;
190189
STATIC_ASSERT(
191190
(std::is_same_v<node_names_t, mentioned_node_names_t>),
192191
"One or more steps are referenced in the flow ({}) but not "
193192
"explicitly added with the * operator. The missing steps are: "
194193
"{}.",
195-
Name, missing_nodes);
194+
Name, detail::error_steps<missing_nodes_t>);
196195

197196
constexpr auto duplicates = stdx::transform(
198197
[](auto e) { return stdx::get<0>(e); },
199198
stdx::filter<detail::is_duplicated>(stdx::gather(node_names)));
200199
using duplicate_nodes_t = decltype(duplicates);
201-
constexpr auto dup_nodes = error_steps<duplicate_nodes_t>;
202200
STATIC_ASSERT(
203201
stdx::tuple_size_v<duplicate_nodes_t> == 0,
204202
"One or more steps in the flow ({}) are explicitly added more than "
205203
"once using the * operator. The duplicate steps are: {}.",
206-
Name, dup_nodes);
204+
Name, detail::error_steps<duplicate_nodes_t>);
207205
}
208206

209207
template <typename Graph>

0 commit comments

Comments
 (0)