* @example merge.cpp **/
| 6 | * @example merge.cpp |
| 7 | **/ |
| 8 | int main() |
| 9 | { |
| 10 | //! [merge] |
| 11 | rpp::source::just(rpp::source::just(1).as_dynamic(), |
| 12 | rpp::source::never<int>().as_dynamic(), |
| 13 | rpp::source::just(2).as_dynamic()) |
| 14 | | rpp::operators::merge() |
| 15 | | rpp::operators::subscribe([](int v) { std::cout << v << " "; }); |
| 16 | // Output: 1 2 |
| 17 | //! [merge] |
| 18 | |
| 19 | //! [merge_with] |
| 20 | rpp::source::just(1) |
| 21 | | rpp::operators::merge_with(rpp::source::just(2)) |
| 22 | | rpp::operators::subscribe([](int v) { std::cout << v << " "; }); |
| 23 | // Output: 1 2 |
| 24 | //! [merge_with] |
| 25 | return 0; |
| 26 | } |
nothing calls this directly
no test coverage detected