ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
memory_model.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
11
#pragma once
12
13
#include <concepts>
14
15
namespace
rpp::memory_model
16
{
17
// copy and move everywhere when needed
18
struct
use_stack
19
{
20
};
21
22
// make shared_ptr once and avoid any future copies/moves
23
struct
use_shared
24
{
25
};
26
}
// namespace rpp::memory_model
27
28
namespace
rpp::constraint
29
{
30
template
<
typename
T>
31
concept
memory_model
= std::same_as<rpp::memory_model::use_shared, T> || std::same_as<rpp::memory_model::use_stack, T>;
32
}
// namespace rpp::constraint
rpp::constraint::memory_model
Definition
memory_model.hpp:31
rpp::memory_model::use_shared
Definition
memory_model.hpp:24
rpp::memory_model::use_stack
Definition
memory_model.hpp:19
src
rpp
rpp
memory_model.hpp
Generated by
1.12.0