@@ -111,6 +111,9 @@ concept real_or_complex = real<T> || complex<T>;
111
111
template <typename T>
112
112
concept arithmetic = std::is_arithmetic_v<T>;
113
113
114
+ template <typename T>
115
+ concept numerical = arithmetic<T> || real_or_complex<T>;
116
+
114
117
template <typename T>
115
118
concept signed_arithmetic = arithmetic<T> && std::is_signed_v<T>;
116
119
@@ -165,6 +168,10 @@ template <typename T>
165
168
concept arbitrary_real_or_complex_type = arbitrary_real_type<T> ||
166
169
arbitrary_complex_type<T>;
167
170
171
+ template <typename T>
172
+ concept arbitrary_numerical_type = arbitrary_real_or_complex_type<T> ||
173
+ arbitrary_arithmetic_type<T>;
174
+
168
175
template <typename T>
169
176
concept policy = boost::math::policies::is_policy<T>::value;
170
177
@@ -210,6 +217,7 @@ concept random_access_container = is_container<T> &&
210
217
#define BOOST_MATH_COMPLEX boost::math::concepts::complex
211
218
#define BOOST_MATH_REAL_OR_COMPLEX boost::math::concepts::real_or_complex
212
219
#define BOOST_MATH_ARITHMETIC boost::math::concepts::arithmetic
220
+ #define BOOST_MATH_NUMERICAL boost::math::concepts::numerical
213
221
#define BOOST_MATH_SIGNED_ARITHMETIC boost::math::concepts::signed_arithmetic
214
222
#define BOOST_MATH_UNSIGNED_ARITHMETIC boost::math::concepts::unsigned_arithmetic
215
223
#define BOOST_MATH_ARBITRARY_UNSIGNED_ARITHMETIC boost::math::concepts::arbitrary_unsigned_arithmetic_type
@@ -221,6 +229,7 @@ concept random_access_container = is_container<T> &&
221
229
#define BOOST_MATH_ARBITRARY_REAL boost::math::concepts::arbitrary_real_type
222
230
#define BOOST_MATH_ARBITRARY_COMPLEX boost::math::concepts::arbitrary_complex_type
223
231
#define BOOST_MATH_ARBITRARY_REAL_OR_COMPLEX boost::math::concepts::arbitrary_real_or_complex_type
232
+ #define BOOST_MATH_ARBITRARY_NUMERICAL boost::math::concepts::arbitrary_numerical_type
224
233
#define BOOST_MATH_POLICY boost::math::concepts::policy
225
234
#define BOOST_MATH_CONTAINER boost::math::concepts::is_container
226
235
#define BOOST_MATH_RANDOM_ACCESS_CONTAINER boost::math::concepts::random_access_container
@@ -288,6 +297,10 @@ concept execution_policy = std::is_execution_policy_v<std::remove_cvref_t<T>>;
288
297
# define BOOST_MATH_ARITHMETIC typename
289
298
#endif
290
299
300
+ #ifndef BOOST_MATH_NUMERICAL
301
+ # define BOOST_MATH_NUMERICAL typename
302
+ #endif
303
+
291
304
#ifndef BOOST_MATH_SIGNED_ARITHMETIC
292
305
# define BOOST_MATH_SIGNED_ARITHMETIC typename
293
306
#endif
@@ -332,6 +345,10 @@ concept execution_policy = std::is_execution_policy_v<std::remove_cvref_t<T>>;
332
345
# define BOOST_MATH_ARBITRARY_REAL_OR_COMPLEX typename
333
346
#endif
334
347
348
+ #ifndef BOOST_MATH_ARBITRARY_NUMERICAL
349
+ # define BOOST_MATH_ARBITRARY_NUMERICAL typename
350
+ #endif
351
+
335
352
#ifndef BOOST_MATH_POLICY
336
353
# define BOOST_MATH_POLICY typename
337
354
#endif
0 commit comments