File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,7 @@ target_sources(containers PUBLIC
360
360
source /containers/splicable.cpp
361
361
source /containers/stable_vector.cpp
362
362
source /containers/static_vector.cpp
363
+ source /containers/stored_function.cpp
363
364
source /containers/string .cpp
364
365
source /containers/supports_lazy_insert_after.cpp
365
366
source /containers/take.cpp
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import containers.array;
14
14
import containers.common_iterator_functions;
15
15
import containers.index_type;
16
16
import containers.offset_type;
17
+ import containers.stored_function;
17
18
18
19
import bounded;
19
20
import numeric_traits;
@@ -25,13 +26,6 @@ using namespace bounded::literal;
25
26
26
27
namespace containers {
27
28
28
- template <typename Function>
29
- using stored_function = std::conditional_t <
30
- std::is_empty_v<Function> and std::is_trivially_copyable_v<Function>,
31
- std::remove_const_t <Function>,
32
- decltype (std::reference_wrapper(bounded::declval<Function &>()))
33
- >;
34
-
35
29
template <typename LHS, typename RHS>
36
30
concept construct_subtractable = requires (LHS const lhs, RHS const rhs) {
37
31
LHS (lhs - rhs);
Original file line number Diff line number Diff line change
1
+ // Copyright David Stone 2023.
2
+ // Distributed under the Boost Software License, Version 1.0.
3
+ // (See accompanying file LICENSE_1_0.txt or copy at
4
+ // http://www.boost.org/LICENSE_1_0.txt)
5
+
6
+ export module containers.stored_function;
7
+
8
+ import bounded;
9
+ import std_module;
10
+
11
+ namespace containers {
12
+
13
+ export template <typename Function>
14
+ using stored_function = std::conditional_t <
15
+ std::is_empty_v<Function> and std::is_trivially_copyable_v<Function>,
16
+ std::remove_const_t <Function>,
17
+ decltype (std::reference_wrapper(bounded::declval<Function &>()))
18
+ >;
19
+
20
+ } // namespace containers
You can’t perform that action at this time.
0 commit comments