From be328aa19bce484c4b58e5aa29c2ee23a19a4e39 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 21 Aug 2014 15:20:30 +0400 Subject: [PATCH] Make BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS defined when BOOST_NO_CXX11_DEFAULTED_FUNCTIONS is defined. Lack of non-public defaulted functions is implied by the lack of any defaulted functions, so define the defect macro. --- include/boost/config/compiler/gcc.hpp | 2 +- include/boost/config/suffix.hpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index b0a7d2e9..64adb981 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -183,7 +183,7 @@ #endif // GCC 4.5 forbids declaration of defaulted functions in private or protected sections -#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 5) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index a3fda525..6ee57585 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -1,5 +1,5 @@ // Boost config.hpp configuration header file ------------------------------// -// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file +// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler @@ -646,6 +646,11 @@ namespace std{ using ::type_info; } # define BOOST_ALIGNMENT(x) #endif +// Lack of non-public defaulted functions is implied by the lack of any defaulted functions +#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + // Defaulted and deleted function declaration helpers // These macros are intended to be inside a class definition. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its @@ -681,7 +686,7 @@ namespace std{ using ::type_info; } // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined // #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) -#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE #endif // -------------------- Deprecated macros for 1.50 ---------------------------