defect macro for C++14 feature std::exchange()

This commit is contained in:
Oliver Kowalke
2016-12-12 19:41:30 +01:00
parent 68b7cc8759
commit 13f5d9c88a
18 changed files with 153 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
#
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Sun Dec 11 12:22:05 2016
# This file was automatically generated on Mon Dec 12 19:37:08 2016
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -130,6 +130,7 @@ run-simple <define>TEST_BOOST_NO_CXX14_HDR_SHARED_MUTEX : cxx14_hdr_shared_mutex
run-simple <define>TEST_BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES : cxx14_initialized_lambda_captures ;
run-simple <define>TEST_BOOST_NO_CXX14_AGGREGATE_NSDMI : cxx14_aggregate_nsdmi ;
run-simple <define>TEST_BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION : cxx14_return_type_deduction ;
run-simple <define>TEST_BOOST_NO_CXX14_STD_EXCHANGE : cxx14_std_exchange ;
run-simple <define>TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES : cxx14_variable_templates ;
run-simple <define>TEST_BOOST_NO_CXX17_STD_APPLY : cxx17_std_apply ;
run-simple <define>TEST_BOOST_NO_CXX17_STD_INVOKE : cxx17_std_invoke ;

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Sun Dec 11 12:22:05 2016
// This file was automatically generated on Mon Dec 12 19:37:08 2016
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@@ -453,6 +453,10 @@ namespace test = boost_no_cxx14_aggregate_nsdmi;
# include "../test/boost_no_cxx14_return_type_ded.ipp"
namespace test = boost_no_cxx14_return_type_deduction;
#endif
#ifdef TEST_BOOST_NO_CXX14_STD_EXCHANGE
# include "../test/boost_no_cxx14_std_exchange.ipp"
namespace test = boost_no_cxx14_std_exchange;
#endif
#ifdef TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES
# include "../test/boost_no_cxx14_var_templ.ipp"
namespace test = boost_no_cxx14_variable_templates;

View File

@@ -157,6 +157,11 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX14_STD_EXCHANGE
#endif
// C++17 features
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX17_STD_APPLY

View File

@@ -72,6 +72,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -79,6 +79,11 @@
#define BOOST_NO_STD_MESSAGES
#endif
// C++14 features
#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX14_STD_EXCHANGE
#endif
// C++17 features
#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -239,6 +239,7 @@
// Although <regex> is present and compilable against, the actual implementation is not functional
// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively.
# define BOOST_NO_CXX11_HDR_REGEX
# define BOOST_NO_CXX14_STD_EXCHANGE
#endif
#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))

View File

@@ -61,6 +61,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -85,6 +85,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -197,6 +197,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -155,6 +155,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -245,6 +245,9 @@ namespace boost { using std::min; using std::max; }
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -61,6 +61,9 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE

View File

@@ -1,7 +1,7 @@
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Sun Dec 11 12:22:04 2016
# This file was automatically generated on Mon Dec 12 19:37:08 2016
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -355,6 +355,9 @@ test-suite "BOOST_NO_CXX14_AGGREGATE_NSDMI" :
test-suite "BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION" :
[ run ../no_cxx14_return_type_ded_pass.cpp ]
[ compile-fail ../no_cxx14_return_type_ded_fail.cpp ] ;
test-suite "BOOST_NO_CXX14_STD_EXCHANGE" :
[ run ../no_cxx14_std_exchange_pass.cpp ]
[ compile-fail ../no_cxx14_std_exchange_fail.cpp ] ;
test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" :
[ run ../no_cxx14_var_templ_pass.cpp ]
[ compile-fail ../no_cxx14_var_templ_fail.cpp ] ;

View File

@@ -0,0 +1,23 @@
// (C) Copyright Oliver Kowalke 2016.
// 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_CXX14_STD_EXCHANGE
// TITLE: apply
// DESCRIPTION: The compiler supports the std::exchange() function.
#include <utility>
namespace boost_no_cxx14_std_exchange {
int test() {
int * i = new int( 1);
int * j = std::exchange( i, nullptr);
delete j;
return 0;
}
}

View File

@@ -1073,6 +1073,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX14_HDR_SHARED_MUTEX);
PRINT_MACRO(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES);
PRINT_MACRO(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION);
PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE);
PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES);
PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY);
PRINT_MACRO(BOOST_NO_CXX17_STD_INVOKE);
@@ -1147,6 +1148,7 @@ void print_boost_macros()
// END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL);

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Sun Dec 11 12:22:04 2016
// This file was automatically generated on Mon Dec 12 19:37:08 2016
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@@ -312,6 +312,11 @@ namespace boost_no_cxx14_aggregate_nsdmi = empty_boost;
#else
namespace boost_no_cxx14_return_type_deduction = empty_boost;
#endif
#ifndef BOOST_NO_CXX14_STD_EXCHANGE
#include "boost_no_cxx14_std_exchange.ipp"
#else
namespace boost_no_cxx14_std_exchange = empty_boost;
#endif
#ifndef BOOST_NO_CXX14_VARIABLE_TEMPLATES
#include "boost_no_cxx14_var_templ.ipp"
#else
@@ -1566,6 +1571,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx14_std_exchange::test())
{
std::cerr << "Failed test for BOOST_NO_CXX14_STD_EXCHANGE at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx14_variable_templates::test())
{
std::cerr << "Failed test for BOOST_NO_CXX14_VARIABLE_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@@ -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_APPLY
// This file should not compile, if it does then
// BOOST_NO_CXX17_STD_APPLY should not be defined.
// See file boost_no_cxx17_std_apply.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_CXX14_STD_EXCHANGE
#include "boost_no_cxx14_std_exchange.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx14_std_exchange::test();
}

View File

@@ -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_APPLY
// 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
// 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_CXX14_STD_EXCHANGE
#include "boost_no_cxx14_std_exchange.ipp"
#else
namespace boost_no_cxx14_std_exchange = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx14_std_exchange::test();
}