mirror of
https://github.com/boostorg/config.git
synced 2026-07-21 13:13:36 +00:00
Add BOOST_NO_CXX17_STD_LAUNDER
This commit is contained in:
@@ -621,6 +621,11 @@
|
||||
# error "Defect macro BOOST_NO_CXX17_STD_INVOKE is defined."
|
||||
# endif
|
||||
#endif
|
||||
#ifdef TEST_BOOST_NO_CXX17_STD_LAUNDER
|
||||
# ifdef BOOST_NO_CXX17_STD_LAUNDER
|
||||
# error "Defect macro BOOST_NO_CXX17_STD_LAUNDER is defined."
|
||||
# endif
|
||||
#endif
|
||||
#ifdef TEST_BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
# ifdef BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
# error "Defect macro BOOST_NO_CXX17_STRUCTURED_BINDINGS is defined."
|
||||
|
||||
@@ -4184,6 +4184,18 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_NO_CXX17_STD_LAUNDER</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The compiler does not support <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">launder</span><span class="special">()</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
|
||||
@@ -1039,6 +1039,7 @@ that are not yet supported by a particular compiler or library.
|
||||
[[`BOOST_NO_CXX17_HDR_VARIANT`][The compiler does not support the header `<variant>`.]]
|
||||
[[`BOOST_NO_CXX17_STD_APPLY`][The compiler does not support `std::apply()`.]]
|
||||
[[`BOOST_NO_CXX17_STD_INVOKE`][The compiler does not support `std::invoke()`.]]
|
||||
[[`BOOST_NO_CXX17_STD_LAUNDER`][The compiler does not support `std::launder()`.]]
|
||||
[[`BOOST_NO_CXX17_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]]
|
||||
[[`BOOST_NO_CXX17_IF_CONSTEXPR`][The compiler does not support `if constexpr`.]]
|
||||
[[`BOOST_NO_CXX17_INLINE_VARIABLES`][The compiler does not support `inline` variables.]]
|
||||
|
||||
@@ -60,3 +60,6 @@
|
||||
#ifdef BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
# error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_STRUCTURED_BINDINGS."
|
||||
#endif
|
||||
#ifdef BOOST_NO_CXX17_STD_LAUNDER
|
||||
# error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_STD_LAUNDER."
|
||||
#endif
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
|| defined(BOOST_NO_CXX17_ITERATOR_TRAITS)\
|
||||
|| defined(BOOST_NO_CXX17_STD_APPLY)\
|
||||
|| defined(BOOST_NO_CXX17_STD_INVOKE)\
|
||||
|| defined(BOOST_NO_CXX17_STD_LAUNDER)\
|
||||
|| defined(BOOST_NO_CXX17_STRUCTURED_BINDINGS)
|
||||
# define BOOST_NO_CXX17
|
||||
#endif
|
||||
|
||||
@@ -193,6 +193,9 @@
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) || !defined(_MSVC_STL_UPDATE) || (_MSVC_STL_UPDATE < 201709)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
#endif
|
||||
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
#endif
|
||||
|
||||
// C++20 features which aren't configured in suffix.hpp correctly:
|
||||
#if !defined(_MSVC_STL_UPDATE) || (_MSVC_STL_UPDATE < 202008L) || !defined(_HAS_CXX20) || (_HAS_CXX20 == 0)
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
//
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
# define BOOST_NO_CXX17_HDR_STRING_VIEW
|
||||
# define BOOST_NO_CXX17_HDR_VARIANT
|
||||
#endif
|
||||
#if (_LIBCPP_VERSION < 6000) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
#endif
|
||||
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
|
||||
# define BOOST_NO_AUTO_PTR
|
||||
#endif
|
||||
|
||||
@@ -358,6 +358,7 @@ extern "C" char *gets (char *__s);
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
||||
# define BOOST_NO_CXX17_HDR_STRING_VIEW
|
||||
# define BOOST_NO_CXX17_HDR_VARIANT
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "Modena C++ standard library"
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
|
||||
|
||||
@@ -205,4 +205,5 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "SGI standard library"
|
||||
|
||||
@@ -253,6 +253,7 @@ namespace boost { using std::min; using std::max; }
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
# define BOOST_NO_CXX17_STD_LAUNDER
|
||||
# define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "Visual Age default standard library"
|
||||
|
||||
@@ -58,4 +58,5 @@
|
||||
|
||||
#define BOOST_NO_CXX17_STD_INVOKE
|
||||
#define BOOST_NO_CXX17_STD_APPLY
|
||||
#define BOOST_NO_CXX17_STD_LAUNDER
|
||||
#define BOOST_NO_CXX17_ITERATOR_TRAITS
|
||||
|
||||
@@ -391,6 +391,9 @@ test-suite "BOOST_NO_CXX17_STD_APPLY" :
|
||||
test-suite "BOOST_NO_CXX17_STD_INVOKE" :
|
||||
[ run ../no_cxx17_std_invoke_pass.cpp ]
|
||||
[ compile-fail ../no_cxx17_std_invoke_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX17_STD_LAUNDER" :
|
||||
[ run ../no_cxx17_std_launder_pass.cpp ]
|
||||
[ compile-fail ../no_cxx17_std_launder_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX17_STRUCTURED_BINDINGS" :
|
||||
[ run ../no_cxx17_structured_bindings_pass.cpp ]
|
||||
[ compile-fail ../no_cxx17_structured_bindings_fail.cpp ] ;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// (C) Copyright Ion Gaztanaga.
|
||||
// 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_NO_CXX17_STD_LAUNDER
|
||||
// TITLE: launder
|
||||
// DESCRIPTION: The compiler supports the std::launder() function.
|
||||
|
||||
#include <new>
|
||||
|
||||
namespace boost_no_cxx17_std_launder {
|
||||
|
||||
struct X
|
||||
{
|
||||
const int const_int;
|
||||
};
|
||||
|
||||
int test()
|
||||
{
|
||||
X original{1};
|
||||
new (&original) X{2}; //Overwrite X
|
||||
return std::launder(&original)->const_int == 2 ? 0 : -1; //After laundering, new value should be returned
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1183,6 +1183,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_CXX17_ITERATOR_TRAITS);
|
||||
PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY);
|
||||
PRINT_MACRO(BOOST_NO_CXX17_STD_INVOKE);
|
||||
PRINT_MACRO(BOOST_NO_CXX17_STD_LAUNDER);
|
||||
PRINT_MACRO(BOOST_NO_CXX17_STRUCTURED_BINDINGS);
|
||||
PRINT_MACRO(BOOST_NO_CXX20_HDR_BARRIER);
|
||||
PRINT_MACRO(BOOST_NO_CXX20_HDR_BIT);
|
||||
|
||||
@@ -452,6 +452,11 @@ namespace boost_no_cxx17_std_apply = empty_boost;
|
||||
#else
|
||||
namespace boost_no_cxx17_std_invoke = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX17_STD_LAUNDER
|
||||
#include "boost_no_cxx17_std_launder.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx17_std_launder = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
#include "boost_no_cxx17_structured_bindings.ipp"
|
||||
#else
|
||||
|
||||
@@ -367,6 +367,11 @@ namespace boost_no_cxx17_std_apply = empty_boost;
|
||||
#else
|
||||
namespace boost_no_cxx17_std_invoke = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX17_STD_LAUNDER
|
||||
#include "boost_no_cxx17_std_launder.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx17_std_launder = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||
#include "boost_no_cxx17_structured_bindings.ipp"
|
||||
#else
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_CXX17_STD_APPLY
|
||||
// Test file for macro BOOST_NO_CXX14_STD_EXCHANGE
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_CXX17_STD_APPLY should not be defined.
|
||||
// BOOST_NO_CXX14_STD_EXCHANGE should not be defined.
|
||||
// See file boost_no_cxx17_std_apply.ipp for details
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_CXX17_STD_APPLY
|
||||
// Test file for macro BOOST_NO_CXX14_STD_EXCHANGE
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_CXX!/_STD_APPLY should be defined.
|
||||
// See file boost_no_cxx17_std_apply.ipp for details
|
||||
// See file boost_no_cxx14_std_exchange.ipp for details
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// This file was automatically generated on Fri Oct 14 12:13:46 2016
|
||||
// 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_NO_CXX17_STD_LAUNDER
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_CXX17_STD_LAUNDER should not be defined.
|
||||
// See file boost_no_cxx17_std_launder.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 <boost/config.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifdef BOOST_NO_CXX17_STD_LAUNDER
|
||||
#include "boost_no_cxx17_std_launder.ipp"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx17_std_launder::test();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Fri Oct 14 12:13:46 2016
|
||||
// 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_NO_CXX17_STD_LAUNDER
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_CXX17_STD_LAUNDER should be defined.
|
||||
// See file boost_no_cxx17_std_launder.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 <boost/config.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifndef BOOST_NO_CXX17_STD_LAUNDER
|
||||
#include "boost_no_cxx17_std_launder.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx17_std_launder = empty_boost;
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx17_std_launder::test();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user