MCPcopy Create free account
hub / github.com/AlexInLog/ReactivePlusPlus / main

Function main

src/examples/rpp/doxygen/filter.cpp:8–17  ·  view source on GitHub ↗

* @example filter.cpp **/

Source from the content-addressed store, hash-verified

6 * @example filter.cpp
7 **/
8int main() // NOLINT(bugprone-exception-escape)
9{
10 //! [Filter]
11 rpp::source::just(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
12 | rpp::operators::filter([](int v) { return v % 2 == 0; })
13 | rpp::operators::subscribe([](int v) { std::cout << v << " "; });
14 // Output: 0 2 4 6 8
15 //! [Filter]
16 return 0;
17}

Callers

nothing calls this directly

Calls 3

justFunction · 0.85
filterFunction · 0.85
subscribeFunction · 0.85

Tested by

no test coverage detected