mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add configuration for C++14 type traits changes
This commit is contained in:
@@ -36,6 +36,7 @@ obj has_gmp : has_gmp.cpp :
|
|||||||
obj is_ci_sanitizer_run : is_ci_sanitizer_run.cpp ;
|
obj is_ci_sanitizer_run : is_ci_sanitizer_run.cpp ;
|
||||||
obj is_ci_standalone_run : is_ci_standalone_run.cpp ;
|
obj is_ci_standalone_run : is_ci_standalone_run.cpp ;
|
||||||
obj is_cygwin_run : is_cygwin_run.cpp ;
|
obj is_cygwin_run : is_cygwin_run.cpp ;
|
||||||
|
obj has_cxx14_type_traits : has_cxx14_type_traits.cpp ;
|
||||||
|
|
||||||
explicit has_long_double_support ;
|
explicit has_long_double_support ;
|
||||||
explicit has_mpfr_class ;
|
explicit has_mpfr_class ;
|
||||||
@@ -52,3 +53,4 @@ explicit has_fftw3 ;
|
|||||||
explicit is_ci_sanitizer_run ;
|
explicit is_ci_sanitizer_run ;
|
||||||
explicit is_ci_standalone_run ;
|
explicit is_ci_standalone_run ;
|
||||||
explicit is_cygwin_run ;
|
explicit is_cygwin_run ;
|
||||||
|
explicit has_cxx14_type_traits ;
|
||||||
|
|||||||
14
config/has_cxx14_type_traits.cpp
Normal file
14
config/has_cxx14_type_traits.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2025 Matt Borland
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
using big_int = std::conditional_t<(sizeof(long) > sizeof(std::uint32_t)), long, std::uint32_t>;
|
||||||
|
static_assert(sizeof(big_int) >= sizeof(std::uint32_t), "big_int is too small");
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user