summaryrefslogtreecommitdiff
path: root/Rx/v2/examples
diff options
context:
space:
mode:
authorGrigoriy Chudnov <g.chudnov@gmail.com>2016-07-10 15:44:58 +0300
committerGrigoriy Chudnov <g.chudnov@gmail.com>2016-07-10 15:44:58 +0300
commit739aae328ee95b6c8074e60db2d6af3b9b9a3268 (patch)
treea451d11eee6e5d5c3808104dbf738701d2fc9f43 /Rx/v2/examples
parent8816ce9a9cc5329ddc5d292fd519495df9346ac7 (diff)
downloadRxCpp-739aae328ee95b6c8074e60db2d6af3b9b9a3268.tar.gz
exposed empty as a source
Diffstat (limited to 'Rx/v2/examples')
-rw-r--r--Rx/v2/examples/doxygen/empty.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Rx/v2/examples/doxygen/empty.cpp b/Rx/v2/examples/doxygen/empty.cpp
index 28956a9..1ace4eb 100644
--- a/Rx/v2/examples/doxygen/empty.cpp
+++ b/Rx/v2/examples/doxygen/empty.cpp
@@ -23,3 +23,15 @@ SCENARIO("threaded empty sample"){
[](){printf("OnCompleted\n");});
printf("//! [threaded empty sample]\n");
}
+
+SCENARIO("empty operator syntax sample"){
+ using namespace rxcpp::sources;
+
+ printf("//! [empty operator syntax sample]\n");
+ auto values = empty<int>();
+ values.
+ subscribe(
+ [](int v){printf("OnNext: %d\n", v);},
+ [](){printf("OnCompleted\n");});
+ printf("//! [empty operator syntax sample]\n");
+}