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.
This commit is contained in:
Andrey Semashev
2014-08-21 15:20:30 +04:00
parent ef0fbe981a
commit be328aa19b
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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