Skip to content

Commit f706eff

Browse files
committed
Add configuration for C++14 type traits changes
1 parent e1158bb commit f706eff

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

config/Jamfile.v2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ obj has_gmp : has_gmp.cpp :
3636
obj is_ci_sanitizer_run : is_ci_sanitizer_run.cpp ;
3737
obj is_ci_standalone_run : is_ci_standalone_run.cpp ;
3838
obj is_cygwin_run : is_cygwin_run.cpp ;
39+
obj has_cxx14_type_traits : has_cxx14_type_traits.cpp ;
3940

4041
explicit has_long_double_support ;
4142
explicit has_mpfr_class ;
@@ -52,3 +53,4 @@ explicit has_fftw3 ;
5253
explicit is_ci_sanitizer_run ;
5354
explicit is_ci_standalone_run ;
5455
explicit is_cygwin_run ;
56+
explicit has_cxx14_type_traits ;

config/has_cxx14_type_traits.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2025 Matt Borland
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// https://www.boost.org/LICENSE_1_0.txt
4+
5+
#include <type_traits>
6+
#include <cstdint>
7+
8+
using big_int = std::conditional_t<(sizeof(long) > sizeof(std::uint32_t)), long, std::uint32_t>;
9+
static_assert(sizeof(big_int) >= sizeof(std::uint32_t), "big_int is too small");
10+
11+
int main()
12+
{
13+
return 0;
14+
}

0 commit comments

Comments
 (0)