File tree Expand file tree Collapse file tree 4 files changed +29
-4
lines changed Expand file tree Collapse file tree 4 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 86
86
cxx_flags : " "
87
87
- version : 13
88
88
compiler : gcc
89
- install : sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt-get install -y gcc-13 g++-13
89
+ install : sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13
90
90
cc : " gcc-13"
91
91
cxx : " g++-13"
92
92
- version : 12
@@ -232,7 +232,7 @@ jobs:
232
232
- compiler : gcc
233
233
cc : " gcc-13"
234
234
cxx : " g++-13"
235
- install : sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt-get install -y gcc-13 g++-13
235
+ install : sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13
236
236
toolchain_root : " /usr"
237
237
238
238
steps :
@@ -288,7 +288,7 @@ jobs:
288
288
- name : Install build tools
289
289
run : |
290
290
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
291
- sudo apt update && sudo apt-get install -y gcc-${{env.DEFAULT_GCC_VERSION}} g++-${{env.DEFAULT_GCC_VERSION}} ninja-build valgrind
291
+ sudo apt update && sudo apt install -y gcc-${{env.DEFAULT_GCC_VERSION}} g++-${{env.DEFAULT_GCC_VERSION}} ninja-build valgrind
292
292
293
293
- name : Restore CPM cache
294
294
env :
Original file line number Diff line number Diff line change @@ -147,7 +147,8 @@ struct graph_builder {
147
147
constexpr static auto built () {
148
148
constexpr auto v = Initialized::value;
149
149
constexpr auto built = build (v);
150
- static_assert (built.has_value ());
150
+ static_assert (built.has_value (),
151
+ " Topological sort failed: cycle in flow" );
151
152
return *built;
152
153
}
153
154
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ add_unit_test(
119
119
catalog2_lib
120
120
catalog_strings)
121
121
122
+ add_compile_fail_test(flow/fail/cyclic_flow.cpp LIBRARIES warnings cib)
122
123
add_compile_fail_test(msg/fail/callback_bad_field_name.cpp LIBRARIES warnings
123
124
cib)
124
125
add_compile_fail_test(msg/fail/field_location.cpp LIBRARIES warnings cib)
Original file line number Diff line number Diff line change
1
+ #include < cib/cib.hpp>
2
+ #include < flow/flow.hpp>
3
+
4
+ // EXPECT: Topological sort failed: cycle in flow
5
+
6
+ namespace {
7
+ using namespace flow ::literals;
8
+
9
+ constexpr auto a = flow::milestone<" a" >();
10
+ constexpr auto b = flow::milestone<" b" >();
11
+
12
+ struct TestFlowAlpha : public flow ::service<> {};
13
+
14
+ struct CyclicFlowConfig {
15
+ constexpr static auto config = cib::config(
16
+ cib::exports<TestFlowAlpha>, cib::extend<TestFlowAlpha>(a >> b >> a));
17
+ };
18
+ } // namespace
19
+
20
+ auto main () -> int {
21
+ cib::nexus<CyclicFlowConfig> nexus{};
22
+ nexus.service <TestFlowAlpha>();
23
+ }
You can’t perform that action at this time.
0 commit comments