ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
constraints.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#pragma once
11
12#include <rpp/subjects/fwd.hpp>
13#include <rpp/subjects/type_traits.hpp>
14
15#include <concepts>
16
17namespace rpp::subjects::constraint
18{
19template<typename T>
20concept subject = std::derived_from<std::decay_t<T>, details::subject_tag>;
21
22template<typename T, typename Type>
23concept subject_of_type = subject<T> && std::same_as<utils::extract_subject_type_t<T>, Type>;
24
25} // namespace rpp::subjects::constraint
Definition: constraints.hpp:23
Definition: constraints.hpp:20