ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
never.hpp
1// ReactivePlusPlus library
2//
3// Copyright Aleksey Loginov 2022 - 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
11#pragma once
12
13#include <rpp/sources/create.hpp>
14#include <rpp/sources/fwd.hpp>
15#include <rpp/utils/constraints.hpp>
16
17IMPLEMENTATION_FILE(never_tag);
18
19namespace rpp::observable
20{
33template<constraint::decayed_type Type>
34auto never() requires rpp::details::is_header_included<rpp::details::never_tag, Type>
35{
36 return create<Type>([](const auto&) { });
37}
38} // namespace rpp::observable
auto never()
Creates rpp::specific_observable that emits no items and does not terminate.
Definition: never.hpp:31