ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
never.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
16
namespace
rpp::details
17
{
18
template
<constra
int
::decayed_type Type>
19
struct
never_strategy
20
{
21
using
value_type = Type;
22
using
optimal_disposables_strategy
=
rpp::details::observables::fixed_disposables_strategy<0>
;
23
24
static
void
subscribe(
const
auto
&) {}
25
};
26
}
// namespace rpp::details
27
28
namespace
rpp
29
{
30
template
<constra
int
::decayed_type Type>
31
using
never_observable
=
observable<Type, details::never_strategy<Type>
>;
32
}
// namespace rpp
33
34
namespace
rpp::source
35
{
48
template
<constra
int
::decayed_type Type>
49
auto
never
()
50
{
51
return
never_observable<Type>{};
52
}
53
}
// namespace rpp::source
rpp::observable
Base class for any observable used in RPP. It handles core callbacks of observable.
Definition
observable.hpp:38
rpp::source::never
auto never()
Creates rpp::observable that emits no items and does not terminate.
Definition
never.hpp:46
rpp::details::never_strategy
Definition
never.hpp:20
rpp::details::observables::fixed_disposables_strategy
Definition
disposables_strategy.hpp:29
src
rpp
rpp
sources
never.hpp
Generated by
1.12.0