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/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(); +} +