Add test case for BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS under new name compared to original pull request (also less churn in the generated files).

This commit is contained in:
jzmaddock
2014-08-22 18:35:16 +01:00
parent 04c139e40f
commit 82457fadb7
8 changed files with 138 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Fri Aug 15 15:51:00 2014
# This file was automatically generated on Fri Aug 22 18:33:21 2014
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@ -305,6 +305,9 @@ explicit cxx11_hdr_unordered_set ;
run-simple test_case.cpp : : : <define>TEST_BOOST_NO_CXX11_INLINE_NAMESPACES : cxx11_inline_namespaces ;
alias cxx11_inline_namespaces : cxx11_inline_namespaces.output ;
explicit cxx11_inline_namespaces ;
run-simple test_case.cpp : : : <define>TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS : cxx11_non_public_defaulted_functions ;
alias cxx11_non_public_defaulted_functions : cxx11_non_public_defaulted_functions.output ;
explicit cxx11_non_public_defaulted_functions ;
run-simple test_case.cpp : : : <define>TEST_BOOST_NO_CXX11_NUMERIC_LIMITS : cxx11_numeric_limits ;
alias cxx11_numeric_limits : cxx11_numeric_limits.output ;
explicit cxx11_numeric_limits ;

View File

@ -1,4 +1,4 @@
// This file was automatically generated on Fri Aug 15 15:51:00 2014
// This file was automatically generated on Fri Aug 22 18:33:21 2014
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@ -381,6 +381,10 @@ namespace test = boost_no_cxx11_hdr_unordered_set;
# include "../test/boost_no_cxx11_inline_namespaces.ipp"
namespace test = boost_no_cxx11_inline_namespaces;
#endif
#ifdef TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
# include "../test/boost_no_cxx11_non_pub_def_fun.ipp"
namespace test = boost_no_cxx11_non_public_defaulted_functions;
#endif
#ifdef TEST_BOOST_NO_CXX11_NUMERIC_LIMITS
# include "../test/boost_no_cxx11_numeric_limits.ipp"
namespace test = boost_no_cxx11_numeric_limits;

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 Fri Aug 15 15:51:00 2014
# This file was automatically generated on Fri Aug 22 18:33:21 2014
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@ -301,6 +301,9 @@ test-suite "BOOST_NO_CXX11_HDR_UNORDERED_SET" :
test-suite "BOOST_NO_CXX11_INLINE_NAMESPACES" :
[ run ../no_cxx11_inline_namespaces_pass.cpp ]
[ compile-fail ../no_cxx11_inline_namespaces_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS" :
[ run ../no_cxx11_non_pub_def_fun_pass.cpp ]
[ compile-fail ../no_cxx11_non_pub_def_fun_fail.cpp ] ;
test-suite "BOOST_NO_CXX11_NUMERIC_LIMITS" :
[ run ../no_cxx11_numeric_limits_pass.cpp ]
[ compile-fail ../no_cxx11_numeric_limits_fail.cpp ] ;

View File

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

View File

@ -1036,6 +1036,7 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_CXX11_LAMBDAS);
PRINT_MACRO(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS);
PRINT_MACRO(BOOST_NO_CXX11_NOEXCEPT);
PRINT_MACRO(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS);
PRINT_MACRO(BOOST_NO_CXX11_NULLPTR);
PRINT_MACRO(BOOST_NO_CXX11_NUMERIC_LIMITS);
PRINT_MACRO(BOOST_NO_CXX11_RANGE_BASED_FOR);
@ -1132,6 +1133,7 @@ void print_boost_macros()
// END GENERATED BLOCK

View File

@ -1,4 +1,4 @@
// This file was automatically generated on Fri Aug 15 15:51:00 2014
// This file was automatically generated on Fri Aug 22 18:33:21 2014
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@ -227,6 +227,11 @@ namespace boost_no_cxx11_hdr_unordered_set = empty_boost;
#else
namespace boost_no_cxx11_inline_namespaces = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
#include "boost_no_cxx11_non_pub_def_fun.ipp"
#else
namespace boost_no_cxx11_non_public_defaulted_functions = empty_boost;
#endif
#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
#include "boost_no_cxx11_numeric_limits.ipp"
#else
@ -1396,6 +1401,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX11_INLINE_NAMESPACES at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_non_public_defaulted_functions::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx11_numeric_limits::test())
{
std::cerr << "Failed test for BOOST_NO_CXX11_NUMERIC_LIMITS at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@ -0,0 +1,37 @@
// This file was automatically generated on Fri Aug 22 18:33:20 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_cxx11_non_pub_def_fun.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_cxx11_non_pub_def_fun.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx11_non_public_defaulted_functions::test();
}

View File

@ -0,0 +1,37 @@
// This file was automatically generated on Fri Aug 22 18:33:20 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_cxx11_non_pub_def_fun.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_cxx11_non_pub_def_fun.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();
}