Merge pull request #205 from akrzemi1/develop

Added macro BOOST_NO_CXX11_DEFAULTED_MOVES
This commit is contained in:
jzmaddock
2018-01-25 10:12:08 +00:00
committed by GitHub
13 changed files with 135 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
# #
# *** DO NOT EDIT THIS FILE BY HAND *** # *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Sun Jul 9 16:30:35 2017 # This file was automatically generated on Wed Jan 03 23:31:31 2018
# by libs/config/tools/generate.cpp # by libs/config/tools/generate.cpp
# Copyright John Maddock. # Copyright John Maddock.
# Use, modification and distribution are subject to the # Use, modification and distribution are subject to the
@@ -67,6 +67,7 @@ obj cxx11_addressof : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ADDRESSOF ;
obj cxx11_alignas : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ALIGNAS ; obj cxx11_alignas : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ALIGNAS ;
obj cxx11_allocator : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ALLOCATOR ; obj cxx11_allocator : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ALLOCATOR ;
obj cxx11_atomic_smart_ptr : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ATOMIC_SMART_PTR ; obj cxx11_atomic_smart_ptr : test_case.cpp : <define>TEST_BOOST_NO_CXX11_ATOMIC_SMART_PTR ;
obj cxx11_defaulted_moves : test_case.cpp : <define>TEST_BOOST_NO_CXX11_DEFAULTED_MOVES ;
obj cxx11_final : test_case.cpp : <define>TEST_BOOST_NO_CXX11_FINAL ; obj cxx11_final : test_case.cpp : <define>TEST_BOOST_NO_CXX11_FINAL ;
obj cxx11_hdr_array : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_ARRAY ; obj cxx11_hdr_array : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_ARRAY ;
obj cxx11_hdr_atomic : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_ATOMIC ; obj cxx11_hdr_atomic : test_case.cpp : <define>TEST_BOOST_NO_CXX11_HDR_ATOMIC ;

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Sun Jul 9 16:30:35 2017 // This file was automatically generated on Wed Jan 03 23:31:31 2018
// by libs/config/tools/generate.cpp // by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4. // Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
@@ -291,6 +291,11 @@
# error "Defect macro BOOST_NO_CXX11_ATOMIC_SMART_PTR is defined." # error "Defect macro BOOST_NO_CXX11_ATOMIC_SMART_PTR is defined."
# endif # endif
#endif #endif
#ifdef TEST_BOOST_NO_CXX11_DEFAULTED_MOVES
# ifdef BOOST_NO_CXX11_DEFAULTED_MOVES
# error "Defect macro BOOST_NO_CXX11_DEFAULTED_MOVES is defined."
# endif
#endif
#ifdef TEST_BOOST_NO_CXX11_FINAL #ifdef TEST_BOOST_NO_CXX11_FINAL
# ifdef BOOST_NO_CXX11_FINAL # ifdef BOOST_NO_CXX11_FINAL
# error "Defect macro BOOST_NO_CXX11_FINAL is defined." # error "Defect macro BOOST_NO_CXX11_FINAL is defined."

View File

@@ -625,6 +625,9 @@ deleted (`= delete`) functions.
[[`BOOST_NO_CXX11_DEFAULTED_FUNCTIONS`][The compiler does not support [[`BOOST_NO_CXX11_DEFAULTED_FUNCTIONS`][The compiler does not support
defaulted (`= default`) functions. defaulted (`= default`) functions.
]] ]]
[[`BOOST_NO_CXX11_DEFAULTED_MOVES`][The compiler does not support
defaulted move constructor or assignment. Other defaulted functions may still be supported.
]]
[[`BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS`][The compiler does not support [[`BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS`][The compiler does not support
explicit conversion operators (`explicit operator T()`). explicit conversion operators (`explicit operator T()`).
]] ]]

View File

@@ -174,6 +174,7 @@
#define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DECLTYPE_N3276
#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST

View File

@@ -233,6 +233,7 @@
// //
#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) #if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
#define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_CXX11_DEFAULTED_MOVES
#define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NOEXCEPT
#define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NULLPTR
#define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RANGE_BASED_FOR

View File

@@ -167,6 +167,7 @@
// //
#if (_MSC_FULL_VER < 190023026) #if (_MSC_FULL_VER < 190023026)
# define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_NOEXCEPT
# define BOOST_NO_CXX11_DEFAULTED_MOVES
# define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_REF_QUALIFIERS
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS
# define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_ALIGNAS

View File

@@ -687,6 +687,11 @@ namespace std{ using ::type_info; }
# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
#endif #endif
// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
# define BOOST_NO_CXX11_DEFAULTED_MOVES
#endif
// Defaulted and deleted function declaration helpers // Defaulted and deleted function declaration helpers
// These macros are intended to be inside a class definition. // These macros are intended to be inside a class definition.
// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its

View File

@@ -1,7 +1,7 @@
# #
# Regression test Jamfile for boost configuration setup. # Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND *** # *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Sun Jul 9 16:30:35 2017 # This file was automatically generated on Wed Jan 03 23:31:31 2018
# by libs/config/tools/generate.cpp # by libs/config/tools/generate.cpp
# Copyright John Maddock. # Copyright John Maddock.
# Use, modification and distribution are subject to the # Use, modification and distribution are subject to the
@@ -190,6 +190,9 @@ test-suite "BOOST_NO_CXX11_ALLOCATOR" :
test-suite "BOOST_NO_CXX11_ATOMIC_SMART_PTR" : test-suite "BOOST_NO_CXX11_ATOMIC_SMART_PTR" :
[ run ../no_cxx11_atomic_sp_pass.cpp ] [ run ../no_cxx11_atomic_sp_pass.cpp ]
[ compile-fail ../no_cxx11_atomic_sp_fail.cpp ] ; [ compile-fail ../no_cxx11_atomic_sp_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_DEFAULTED_MOVES" :
[ run ../no_cxx11_defaulted_moves_pass.cpp ]
[ compile-fail ../no_cxx11_defaulted_moves_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_FINAL" : test-suite "BOOST_NO_CXX11_FINAL" :
[ run ../no_cxx11_final_pass.cpp ] [ run ../no_cxx11_final_pass.cpp ]
[ compile-fail ../no_cxx11_final_fail.cpp ] ; [ compile-fail ../no_cxx11_final_fail.cpp ] ;

View File

@@ -0,0 +1,25 @@
// (C) Copyright Andrzej Krzemienski 2018
// 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 more information.
// MACRO: BOOST_NO_CXX11_DEFAULTED_MOVES
// TITLE: C++0x defaulting of move constructor/assignment unavailable
// DESCRIPTION: The compiler does not support C++0x defaulting of move constructor/assignment
namespace boost_no_cxx11_defaulted_moves {
struct foo {
foo(foo&&) = default;
foo& operator=(foo&&) = default;
};
int test()
{
return 0;
}
}

View File

@@ -1068,6 +1068,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE); PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE);
PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276); PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276);
PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS); PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_MOVES);
PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS); PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS); PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS);
PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE); PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE);
@@ -1200,6 +1201,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_VOID_RETURNS); PRINT_MACRO(BOOST_NO_VOID_RETURNS);
// END GENERATED BLOCK // END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL); PRINT_MACRO(BOOST_INTEL);

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Sun Jul 9 16:30:35 2017 // This file was automatically generated on Wed Jan 03 23:31:31 2018
// by libs/config/tools/generate.cpp // by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4. // Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
@@ -122,6 +122,11 @@ namespace boost_no_cxx11_allocator = empty_boost;
#else #else
namespace boost_no_cxx11_atomic_smart_ptr = empty_boost; namespace boost_no_cxx11_atomic_smart_ptr = empty_boost;
#endif #endif
#ifndef BOOST_NO_CXX11_DEFAULTED_MOVES
#include "boost_no_cxx11_defaulted_moves.ipp"
#else
namespace boost_no_cxx11_defaulted_moves = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_FINAL #ifndef BOOST_NO_CXX11_FINAL
#include "boost_no_cxx11_final.ipp" #include "boost_no_cxx11_final.ipp"
#else #else
@@ -1261,6 +1266,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX11_ATOMIC_SMART_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl; std::cerr << "Failed test for BOOST_NO_CXX11_ATOMIC_SMART_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count; ++error_count;
} }
if(0 != boost_no_cxx11_defaulted_moves::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_DEFAULTED_MOVES at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_final::test()) if(0 != boost_no_cxx11_final::test())
{ {
std::cerr << "Failed test for BOOST_NO_CXX11_FINAL at: " << __FILE__ << ":" << __LINE__ << std::endl; std::cerr << "Failed test for BOOST_NO_CXX11_FINAL at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Wed Jan 03 23:31:30 2018
// 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_CXX11_DEFAULTED_MOVES
// This file should not compile, if it does then
// BOOST_NO_CXX11_DEFAULTED_MOVES should not be defined.
// See file boost_no_cxx11_defaulted_moves.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_CXX11_DEFAULTED_MOVES
#include "boost_no_cxx11_defaulted_moves.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx11_defaulted_moves::test();
}

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Wed Jan 03 23:31:30 2018
// 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_CXX11_DEFAULTED_MOVES
// This file should compile, if it does not then
// BOOST_NO_CXX11_DEFAULTED_MOVES should be defined.
// See file boost_no_cxx11_defaulted_moves.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_CXX11_DEFAULTED_MOVES
#include "boost_no_cxx11_defaulted_moves.ipp"
#else
namespace boost_no_cxx11_defaulted_moves = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx11_defaulted_moves::test();
}