aboutsummaryrefslogtreecommitdiffstats
path: root/Rx/v2/examples/doxygen/ignore_elements.cpp
blob: 86fc2dfe373336a548827bf871b256f66400749b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#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");
}