* @example switch_on_next.cpp **/
| 6 | * @example switch_on_next.cpp |
| 7 | **/ |
| 8 | int main() |
| 9 | { |
| 10 | //! [switch_on_next] |
| 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::switch_on_next() |
| 15 | | rpp::operators::subscribe([](int v) { std::cout << v << " "; }); |
| 16 | // Output: 1 2 |
| 17 | //! [switch_on_next] |
| 18 | |
| 19 | return 0; |
| 20 | } |
nothing calls this directly
no test coverage detected