diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 21b55d6b..3ae69ce9 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -1,6 +1,6 @@ # # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Jun 26 21:48:00 2015 +# This file was automatically generated on Thu Aug 13 16:32:12 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -41,6 +41,9 @@ explicit dirent_h ; run-simple test_case.cpp : : : TEST_BOOST_HAS_EXPM1 : expm1 ; alias expm1 : expm1.output ; explicit expm1 ; +run-simple test_case.cpp : : : TEST_BOOST_HAS_FLOAT128 : float128 ; +alias float128 : float128.output ; +explicit float128 ; run-simple test_case.cpp : : : TEST_BOOST_HAS_FTIME : ftime ; alias ftime : ftime.output ; explicit ftime ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index 9eaf99a1..6193e82d 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Jun 26 21:48:00 2015 +// This file was automatically generated on Thu Aug 13 16:32:12 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -29,6 +29,10 @@ namespace test = boost_has_dirent_h; # include "../test/boost_has_expm1.ipp" namespace test = boost_has_expm1; #endif +#ifdef TEST_BOOST_HAS_FLOAT128 +# include "../test/boost_has_float128.ipp" +namespace test = boost_has_float128; +#endif #ifdef TEST_BOOST_HAS_FTIME # include "../test/boost_has_ftime.ipp" namespace test = boost_has_ftime; diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 3138e4fb..acda8ff0 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -1427,6 +1427,25 @@ + +

+ BOOST_HAS_FLOAT128 +

+ + +

+ Compiler +

+ + +

+ The compiler has __float128 + as a native type which is distinct from all the regular C++ floating + point types. +

+ + +

BOOST_HAS_FTIME diff --git a/doc/html/index.html b/doc/html/index.html index faecedf4..b1e51ae0 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -988,7 +988,7 @@ - +

Last revised: July 07, 2015 at 10:18:34 GMT

Last revised: August 13, 2015 at 16:11:58 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index d1e03d59..0973c365 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -348,6 +348,9 @@ The platform has the POSIX header ``. [[`BOOST_HAS_EXPM1`][Platform][ The platform has the functions `expm1`, `expm1f` and `expm1l` in `` ]] +[[`BOOST_HAS_FLOAT128`][Compiler][ +The compiler has `__float128` as a native type which is distinct +from all the regular C++ floating point types.]] [[`BOOST_HAS_FTIME`][Platform][ The platform has the Win32 API type FTIME. ]] diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 47ea65b0..48ed3c71 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -23,6 +23,10 @@ #define __has_extension __has_feature #endif +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -255,13 +259,15 @@ // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif - - -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +// +// __builtin_unreachable: +#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif +// Clang has supported the 'unused' attribute since the first release. +#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) + #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 41705df0..d9dd59dc 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -143,6 +143,19 @@ #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif +// +// Recent GCC versions have a __float128 native type, we need to +// include a std lib header to detect this - not ideal, but we'll +// be including later anyway when we select the std lib. +// +#ifdef __cplusplus +#include +#else +#include +#endif +#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) +# define BOOST_HAS_FLOAT128 +#endif // C++0x features in 4.3.n and later // @@ -263,7 +276,12 @@ // // Unused attribute: #if __GNUC__ >= 4 -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#endif +// +// __builtin_unreachable: +#if BOOST_GCC_VERSION >= 40800 +#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif #ifndef BOOST_COMPILER diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index ecfacc5e..7789b944 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -20,6 +20,9 @@ #include +#undef BOOST_MSVC +#undef BOOST_MSVC_FULL_VER + #if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) // // These appear to be supported, even though VC++ may not support them: @@ -36,6 +39,9 @@ #include +#undef BOOST_GCC_VERSION +#undef BOOST_GCC_CXX11 + #endif #undef BOOST_COMPILER diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 2fd6d3ec..6017660c 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -125,19 +125,15 @@ #define BOOST_NO_CXX11_FINAL #endif -// -// Issues that effect all known versions: -// -// Variadic templates pass our test case, but enabling this -// causes the compiler to issue a signal 11 and bail out -// in various libraries. The others fail our test cases. -// +#if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // // C++0x features diff --git a/include/boost/config/platform/cloudabi.hpp b/include/boost/config/platform/cloudabi.hpp new file mode 100644 index 00000000..bed7b631 --- /dev/null +++ b/include/boost/config/platform/cloudabi.hpp @@ -0,0 +1,18 @@ +// Copyright Nuxi, https://nuxi.nl/ 2015. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_PLATFORM "CloudABI" + +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_LOG1P +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD diff --git a/include/boost/config/platform/win32.hpp b/include/boost/config/platform/win32.hpp index 60a29abe..450158fb 100644 --- a/include/boost/config/platform/win32.hpp +++ b/include/boost/config/platform/win32.hpp @@ -74,6 +74,14 @@ # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif +// +// Windows Runtime +// +#if defined(WINAPI_FAMILY) && \ + (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +# define BOOST_NO_ANSI_APIS +#endif + #ifndef BOOST_DISABLE_WIN32 // WEK: Added #define BOOST_HAS_FTIME diff --git a/include/boost/config/select_platform_config.hpp b/include/boost/config/select_platform_config.hpp index acd1409e..62fd818b 100644 --- a/include/boost/config/select_platform_config.hpp +++ b/include/boost/config/select_platform_config.hpp @@ -80,6 +80,10 @@ #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" + +#elif defined(__CloudABI__) +// Nuxi CloudABI: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" #else # if defined(unix) \ diff --git a/include/boost/config/stdlib/dinkumware.hpp b/include/boost/config/stdlib/dinkumware.hpp index 90c45c6c..af8ddda5 100644 --- a/include/boost/config/stdlib/dinkumware.hpp +++ b/include/boost/config/stdlib/dinkumware.hpp @@ -172,10 +172,19 @@ // Bug specific to VC14, // See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t // and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 -#if _CPPLIB_VER == 650 +#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) # define BOOST_NO_CXX11_HDR_CODECVT #endif +#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) +// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. +// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ +// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx +# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) +# define BOOST_NO_AUTO_PTR +# endif +#endif + #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 7d27b0cc..9718bedc 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -251,6 +251,10 @@ #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_ATOMIC +// shared_ptr is present, but is not convertible to bool +// which causes all kinds of problems especially in Boost.Thread +// but probably elsewhere as well. +#define BOOST_NO_CXX11_SMART_PTR #endif #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index c0ba3339..17bf1020 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -444,10 +444,12 @@ namespace std { // is defined, in which case it evaluates to return x; Use when you have a return // statement that can never be reached. -#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_UNREACHABLE_RETURN(x) return x; -#else -# define BOOST_UNREACHABLE_RETURN(x) +#ifndef BOOST_UNREACHABLE_RETURN +# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION +# define BOOST_UNREACHABLE_RETURN(x) return x; +# else +# define BOOST_UNREACHABLE_RETURN(x) +# endif #endif // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// @@ -501,6 +503,16 @@ namespace boost{ # endif } #endif +// same again for __float128: +#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) +namespace boost { +# ifdef __GNUC__ + __extension__ typedef __float128 float128_type; +# else + typedef __float128 float128_type; +# endif +} +#endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 69888352..bf7097ec 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -69,7 +69,7 @@ # endif -#ifdef __QNX__ +#if defined(__QNX__) && defined(__EXT_QNX) // QNX (Dinkumware stdlib) defines these as non-standard names. // Reflect to the standard names. diff --git a/include/boost/version.hpp b/include/boost/version.hpp index 7b64aedb..fce02ec7 100644 --- a/include/boost/version.hpp +++ b/include/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 105900 +#define BOOST_VERSION 106000 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,6 +27,6 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_59" +#define BOOST_LIB_VERSION "1_60" #endif diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f0ee88da..2f6a122a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -78,7 +78,7 @@ test-suite config [ run config_info.cpp : : : always_show_run_output off : config_info_no_except ] [ run math_info.cpp : : : always_show_run_output borland:static borland:static ] [ run abi/abi_test.cpp abi/main.cpp ] - [ run limits_test.cpp ../../test/build//boost_test_exec_monitor ] + [ run limits_test.cpp ] [ run link/main.cpp link//link_test : #args : #input-files diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 1bca6e6b..9d0b1e09 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Jun 26 21:48:00 2015 +# This file was automatically generated on Thu Aug 13 16:32:12 2015 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -37,6 +37,9 @@ test-suite "BOOST_HAS_DIRENT_H" : test-suite "BOOST_HAS_EXPM1" : [ run ../has_expm1_pass.cpp ] [ compile-fail ../has_expm1_fail.cpp ] ; +test-suite "BOOST_HAS_FLOAT128" : +[ run ../has_float128_pass.cpp ] +[ compile-fail ../has_float128_fail.cpp ] ; test-suite "BOOST_HAS_FTIME" : [ run ../has_ftime_pass.cpp ] [ compile-fail ../has_ftime_fail.cpp ] ; diff --git a/test/boost_has_float128.ipp b/test/boost_has_float128.ipp new file mode 100644 index 00000000..80b211c1 --- /dev/null +++ b/test/boost_has_float128.ipp @@ -0,0 +1,29 @@ +// (C) Copyright John Maddock 2012. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for most recent version. + +// MACRO: BOOST_HAS_FLOAT128 +// TITLE: __float128 +// DESCRIPTION: The platform supports __float128. + +#include + + +namespace boost_has_float128{ + +int test() +{ +#ifdef __GNUC__ + __extension__ __float128 big_float = 0.0Q; +#else + __float128 big_float = 0.0Q; +#endif + (void)&big_float; + return 0; +} + +} + diff --git a/test/config_info.cpp b/test/config_info.cpp index b466c43c..bb512ac3 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -937,6 +937,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_HAS_CLOCK_GETTIME); PRINT_MACRO(BOOST_HAS_DIRENT_H); PRINT_MACRO(BOOST_HAS_EXPM1); + PRINT_MACRO(BOOST_HAS_FLOAT128); PRINT_MACRO(BOOST_HAS_FTIME); PRINT_MACRO(BOOST_HAS_GETSYSTEMTIMEASFILETIME); PRINT_MACRO(BOOST_HAS_GETTIMEOFDAY); @@ -1125,6 +1126,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_VOID_RETURNS); + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index 3a3f5ba5..18b3726d 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Jun 26 21:48:00 2015 +// This file was automatically generated on Thu Aug 13 16:32:12 2015 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -753,6 +753,11 @@ namespace boost_has_dirent_h = empty_boost; #else namespace boost_has_expm1 = empty_boost; #endif +#ifdef BOOST_HAS_FLOAT128 +#include "boost_has_float128.ipp" +#else +namespace boost_has_float128 = empty_boost; +#endif #ifdef BOOST_HAS_FTIME #include "boost_has_ftime.ipp" #else @@ -1016,6 +1021,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_HAS_EXPM1 at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_has_float128::test()) + { + std::cerr << "Failed test for BOOST_HAS_FLOAT128 at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_has_ftime::test()) { std::cerr << "Failed test for BOOST_HAS_FTIME at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/has_float128_fail.cpp b/test/has_float128_fail.cpp new file mode 100644 index 00000000..cbb42b21 --- /dev/null +++ b/test/has_float128_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 13 16:29:35 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_HAS_FLOAT128 +// This file should not compile, if it does then +// BOOST_HAS_FLOAT128 should be defined. +// See file boost_has_float128.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifndef BOOST_HAS_FLOAT128 +#include "boost_has_float128.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_has_float128::test(); +} + diff --git a/test/has_float128_pass.cpp b/test/has_float128_pass.cpp new file mode 100644 index 00000000..fb0a5683 --- /dev/null +++ b/test/has_float128_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 13 16:29:35 2015 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id$ +// + + +// Test file for macro BOOST_HAS_FLOAT128 +// This file should compile, if it does not then +// BOOST_HAS_FLOAT128 should not be defined. +// See file boost_has_float128.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifdef BOOST_HAS_FLOAT128 +#include "boost_has_float128.ipp" +#else +namespace boost_has_float128 = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_has_float128::test(); +} + diff --git a/test/limits_test.cpp b/test/limits_test.cpp index 3a4cd3a6..62444965 100644 --- a/test/limits_test.cpp +++ b/test/limits_test.cpp @@ -9,8 +9,8 @@ */ #include -#define BOOST_INCLUDE_MAIN -#include +#include +#include #include /* @@ -82,10 +82,10 @@ void test_integral_limits(const T &, const char * msg) << ", max: " << make_char_numeric_for_streaming((lim::max)()) << std::endl; - BOOST_CHECK(static_cast(lim::is_specialized)); - BOOST_CHECK(static_cast(lim::is_integer)); - // BOOST_CHECK(lim::is_modulo); - BOOST_CHECK(static_cast((lim::min)() < (lim::max)())); + BOOST_TEST(static_cast(lim::is_specialized)); + BOOST_TEST(static_cast(lim::is_integer)); + // BOOST_TEST(lim::is_modulo); + BOOST_TEST(static_cast((lim::min)() < (lim::max)())); } template @@ -107,10 +107,10 @@ void test_float_limits(const T &, const char * msg) std::cout << "\nTesting " << msg << std::endl; typedef std::numeric_limits lim; - BOOST_CHECK(static_cast(lim::is_specialized)); - BOOST_CHECK(static_cast(!lim::is_modulo)); - BOOST_CHECK(static_cast(!lim::is_integer)); - BOOST_CHECK(static_cast(lim::is_signed)); + BOOST_TEST(static_cast(lim::is_specialized)); + BOOST_TEST(static_cast(!lim::is_modulo)); + BOOST_TEST(static_cast(!lim::is_integer)); + BOOST_TEST(static_cast(lim::is_signed)); const T infinity = lim::infinity(); const T qnan = lim::quiet_NaN(); @@ -127,15 +127,15 @@ void test_float_limits(const T &, const char * msg) print_hex_val(qnan, "qnan"); print_hex_val(snan, "snan"); - BOOST_CHECK((lim::max)() > 1000); - BOOST_CHECK((lim::min)() > 0); - BOOST_CHECK((lim::min)() < 0.001); - BOOST_CHECK(lim::epsilon() > 0); + BOOST_TEST((lim::max)() > 1000); + BOOST_TEST((lim::min)() > 0); + BOOST_TEST((lim::min)() < 0.001); + BOOST_TEST(lim::epsilon() > 0); if(lim::is_iec559) { - BOOST_CHECK(static_cast(lim::has_infinity)); - BOOST_CHECK(static_cast(lim::has_quiet_NaN)); - BOOST_CHECK(static_cast(lim::has_signaling_NaN)); + BOOST_TEST(static_cast(lim::has_infinity)); + BOOST_TEST(static_cast(lim::has_quiet_NaN)); + BOOST_TEST(static_cast(lim::has_signaling_NaN)); } else { std::cout << "Does not claim IEEE conformance" << std::endl; } @@ -143,8 +143,8 @@ void test_float_limits(const T &, const char * msg) if(lim::has_infinity) { // Make sure those values are not 0 or similar nonsense. // Infinity must compare as if larger than the maximum representable value. - BOOST_CHECK(infinity > (lim::max)()); - BOOST_CHECK(-infinity < -(lim::max)()); + BOOST_TEST(infinity > (lim::max)()); + BOOST_TEST(-infinity < -(lim::max)()); } else { std::cout << "Does not have infinity" << std::endl; } @@ -153,26 +153,26 @@ void test_float_limits(const T &, const char * msg) // NaNs shall always compare "false" when compared for equality // If one of these fail, your compiler may be optimizing incorrectly, // or the standard library is incorrectly configured. - BOOST_CHECK(! (qnan == 42)); - BOOST_CHECK(qnan != 42); + BOOST_TEST(! (qnan == 42)); + BOOST_TEST(qnan != 42); if(lim::is_iec559) { - BOOST_CHECK(! (qnan == qnan)); - BOOST_CHECK(qnan != qnan); + BOOST_TEST(! (qnan == qnan)); + BOOST_TEST(qnan != qnan); } // The following tests may cause arithmetic traps. - // BOOST_CHECK(! (qnan < 42)); - // BOOST_CHECK(! (qnan > 42)); - // BOOST_CHECK(! (qnan <= 42)); - // BOOST_CHECK(! (qnan >= 42)); + // BOOST_TEST(! (qnan < 42)); + // BOOST_TEST(! (qnan > 42)); + // BOOST_TEST(! (qnan <= 42)); + // BOOST_TEST(! (qnan >= 42)); } else { std::cout << "Does not have QNaN" << std::endl; } } -int test_main(int, char*[]) +int cpp_main(int, char*[]) { test_integral_limits(bool(), "bool"); test_integral_limits(char(), "char"); diff --git a/tools/generate.cpp b/tools/generate.cpp index 8a8e7708..625e93f3 100644 --- a/tools/generate.cpp +++ b/tools/generate.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include