Added a test for BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS.

This commit is contained in:
Andrey Semashev
2014-08-21 16:42:50 +04:00
parent 9a1f46fbbc
commit 85dde189ac
8 changed files with 3557 additions and 3423 deletions
+538 -535
View File
File diff suppressed because it is too large Load Diff
+679 -675
View File
File diff suppressed because it is too large Load Diff
+538 -535
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,38 @@
// (C) Copyright Andrey Semashev 2014
// 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_NON_PUBLIC_DEFAULTED_FUNCTIONS
// TITLE: C++11 non-public defaulted functions unavailable
// DESCRIPTION: The compiler does not support C++11 defaulted functions in access control sections other than public
#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(BOOST_INTEL_STDCXX0X)
# error Non-public defaulted functions are not supported in non-C++11 mode
#endif
namespace boost_no_cxx11_non_public_defaulted_functions {
struct foo
{
protected:
foo() = default;
foo& operator= (foo const&) = default;
};
struct bar
{
private:
bar() = default;
bar& operator= (bar const&) = default;
};
int test()
{
return 0;
}
}
+2
View File
@@ -1007,6 +1007,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE);
PRINT_MACRO(BOOST_NO_CXX11_DECLTYPE_N3276);
PRINT_MACRO(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_DELETED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS);
PRINT_MACRO(BOOST_NO_CXX11_EXTERN_TEMPLATE);
@@ -1132,6 +1133,7 @@ void print_boost_macros()
// END GENERATED BLOCK
+1688 -1678
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,37 @@
// This file was automatically generated on Thu Aug 21 15:59:10 2014
// 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_NON_PUBLIC_DEFAULTED_FUNCTIONS
// This file should not compile, if it does then
// BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS should not be defined.
// See file boost_no_non_public_defaulted_functions.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_NON_PUBLIC_DEFAULTED_FUNCTIONS
#include "boost_no_non_public_defaulted_functions.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx11_non_public_defaulted_functions::test();
}
@@ -0,0 +1,37 @@
// This file was automatically generated on Thu Aug 21 15:59:10 2014
// 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_NON_PUBLIC_DEFAULTED_FUNCTIONS
// This file should compile, if it does not then
// BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS should be defined.
// See file boost_no_non_public_defaulted_functions.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_NON_PUBLIC_DEFAULTED_FUNCTIONS
#include "boost_no_non_public_defaulted_functions.ipp"
#else
namespace boost_no_cxx11_non_public_defaulted_functions = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx11_non_public_defaulted_functions::test();
}