diff options
author | Grigoriy Chudnov <g.chudnov@gmail.com> | 2016-02-10 18:52:08 +0300 |
---|---|---|
committer | Grigoriy Chudnov <g.chudnov@gmail.com> | 2016-02-10 18:52:08 +0300 |
commit | ea1195b921c6fc4d51e240cf3632aa45623367bd (patch) | |
tree | 1851829f68ff442439a313f15157037cbb6b415d /Rx/v2/examples | |
parent | f07c06dc4509b697e76693606d63b28d642c8757 (diff) | |
download | RxCpp-ea1195b921c6fc4d51e240cf3632aa45623367bd.tar.gz |
add element_at
Diffstat (limited to 'Rx/v2/examples')
-rw-r--r-- | Rx/v2/examples/doxygen/element_at.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Rx/v2/examples/doxygen/element_at.cpp b/Rx/v2/examples/doxygen/element_at.cpp new file mode 100644 index 0000000..0b52776 --- /dev/null +++ b/Rx/v2/examples/doxygen/element_at.cpp @@ -0,0 +1,14 @@ +#include "rxcpp/rx.hpp" + +#include "rxcpp/rx-test.hpp" +#include "catch.hpp" + +SCENARIO("element_at sample"){ + printf("//! [element_at sample]\n"); + auto values = rxcpp::observable<>::range(1, 7).element_at(3); + values. + subscribe( + [](int v){printf("OnNext: %d\n", v);}, + [](){printf("OnCompleted\n");}); + printf("//! [element_at sample]\n"); +} |