ulib/3party/rxcpp/Rx/v2/examples/doxygen/ignore_elements.cpp
2024-01-10 09:33:36 +08:00

16 lines
422 B
C++

#include "rxcpp/rx.hpp"
#include "rxcpp/rx-test.hpp"
#include "catch.hpp"
SCENARIO("ignore_elements sample"){
printf("//! [ignore_elements sample]\n");
auto values = rxcpp::observable<>::from(1, 2, 3, 4, 5).ignore_elements();
values.
subscribe(
[](int v) { printf("OnNext: %d\n", v); },
[]() { printf("OnCompleted\n"); });
printf("//! [ignore_elements sample]\n");
}