MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / test_constexpr

Function test_constexpr

test/stdexec/algos/factories/test_just_error.cpp:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25{
26
27 constexpr int test_constexpr() noexcept
28 {
29 struct receiver
30 {
31 using receiver_concept = ex::receiver_tag;
32 constexpr void set_error(int const j) && noexcept
33 {
34 i = j;
35 }
36 int& i;
37 };
38 int i = 0;
39 auto op = ex::connect(ex::just_error(5), receiver{i});
40 ex::start(op);
41 return i;
42 }
43 static_assert(test_constexpr() == 5);
44
45 TEST_CASE("Simple test for just_error", "[factories][just_error]")

Callers 1

Calls 1

startFunction · 0.50

Tested by

no test coverage detected