File tree Expand file tree Collapse file tree 4 files changed +19
-11
lines changed Expand file tree Collapse file tree 4 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ target_sources(bounded PUBLIC
32
32
arithmetic/increment_decrement.cpp
33
33
arithmetic/modulus.cpp
34
34
arithmetic/multiplies.cpp
35
+ arithmetic/min_max.cpp
35
36
arithmetic/operators_builtin.cpp
36
37
arithmetic/operators.cpp
37
38
arithmetic/plus.cpp
Original file line number Diff line number Diff line change 6
6
export module bounded.arithmetic.divides;
7
7
8
8
import bounded.arithmetic.extreme_values;
9
+ import bounded.arithmetic.min_max;
9
10
import bounded.arithmetic.safe_abs;
10
11
import bounded.arithmetic.unary_minus;
11
12
import bounded.bounded_integer;
@@ -22,12 +23,6 @@ import std_module;
22
23
23
24
namespace bounded {
24
25
25
- template <typename Min, typename Max>
26
- struct min_max {
27
- Min min;
28
- Max max;
29
- };
30
-
31
26
template <bool condition>
32
27
constexpr auto conditional_function (auto if_true, auto if_false) {
33
28
if constexpr (condition) {
Original file line number Diff line number Diff line change
1
+ // Copyright David Stone 2024.
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 bounded.arithmetic.min_max;
7
+
8
+ namespace bounded {
9
+
10
+ export template <typename Min, typename Max>
11
+ struct min_max {
12
+ Min min;
13
+ Max max;
14
+ };
15
+
16
+ } // namespace bounded
Original file line number Diff line number Diff line change 6
6
export module bounded.arithmetic.modulus;
7
7
8
8
import bounded.arithmetic.extreme_values;
9
+ import bounded.arithmetic.min_max;
9
10
import bounded.arithmetic.safe_abs;
10
11
import bounded.bounded_integer;
11
12
import bounded.comparison;
@@ -20,11 +21,6 @@ import std_module;
20
21
21
22
namespace bounded {
22
23
23
- template <typename Min, typename Max>
24
- struct min_max {
25
- Min min;
26
- Max max;
27
- };
28
24
29
25
using smax_t = numeric_traits::max_signed_t ;
30
26
using umax_t = numeric_traits::max_unsigned_t ;
You can’t perform that action at this time.
0 commit comments