Skip to content

Commit f0a1c2e

Browse files
authored
Merge pull request #1277 from boostorg/build2
Add C++14 <type_trait> requirement to builds
2 parents e93791b + d5f6aa1 commit f0a1c2e

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

build/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ project
2222
[ check-target-builds ../config//has_gcc_visibility "gcc visibility" : <toolset>gcc:<cxxflags>-fvisibility=hidden : ]
2323
[ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ]
2424
[ requires cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates ]
25+
[ check-target-builds ../config//has_cxx14_type_traits "cxx14_type_traits" : : <build>no ]
2526
: usage-requirements
2627
<define>BOOST_MATH_TR1_NO_LIB=1
2728
;

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+
}

test/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ project
7676
<search>$(mpfr_path)/build.vc10/lib/Win32/Debug
7777
[ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ]
7878
[ requires cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx14_variable_templates ]
79+
[ check-target-builds ../config//has_cxx14_type_traits "cxx14_type_traits" : : <build>no ]
7980
;
8081

8182
if $(ntl-path)

0 commit comments

Comments
 (0)