ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
empty.hpp
1// ReactivePlusPlus library
2//
3// Copyright Aleksey Loginov 2023 - present.
4// Distributed under the Boost Software License, Version 1.0.
5// (See accompanying file LICENSE_1_0.txt or copy at
6// https://www.boost.org/LICENSE_1_0.txt)
7//
8// Project home: https://github.com/victimsnino/ReactivePlusPlus
9
10#pragma once
11
12#include <rpp/sources/fwd.hpp>
13
14#include <rpp/observables/observable.hpp>
15
16namespace rpp::details
17{
18 template<constraint::decayed_type Type>
19
21 {
22 using value_type = Type;
24
25 static void subscribe(const auto& obs) { obs.on_completed(); }
26 };
27} // namespace rpp::details
28
29namespace rpp
30{
31 template<constraint::decayed_type Type>
33} // namespace rpp
34
35namespace rpp::source
36{
50 template<constraint::decayed_type Type>
51 auto empty()
52 {
53 return empty_observable<Type>{};
54 }
55} // namespace rpp::source
Base class for any observable used in RPP. It handles core callbacks of observable.
Definition observable.hpp:38
auto empty()
Creates rpp::observable that emits no items but terminates normally.
Definition empty.hpp:48
Definition empty.hpp:21
Definition disposables_strategy.hpp:29