forked from boostorg/config
Added defect macro BOOST_NO_CXX11_UNION_STATIC_DATA for compilers which do not support unions with static data.
This commit is contained in:
1 parent
8aa8d541b3
commit
4031128717
165 files changed
+308
-144
No files matched your search
+4
-1
@@ -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 23 11:11:12 2019
|
||||
# This file was automatically generated on Mon Dec 09 09:47:37 2019
|
||||
# by libs/config/tools/generate.cpp
|
||||
# Copyright John Maddock.
|
||||
# Use, modification and distribution are subject to the
|
||||
@@ -595,6 +595,9 @@ test-suite "BOOST_NO_CXX11_UNICODE_LITERALS" :
|
||||
test-suite "BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX" :
|
||||
[ run ../no_unified_init_pass.cpp ]
|
||||
[ compile-fail ../no_unified_init_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX11_UNION_STATIC_DATA" :
|
||||
[ run ../no_union_static_data_pass.cpp ]
|
||||
[ compile-fail ../no_union_static_data_fail.cpp ] ;
|
||||
test-suite "BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL" :
|
||||
[ run ../no_using_breaks_adl_pass.cpp ]
|
||||
[ compile-fail ../no_using_breaks_adl_fail.cpp ] ;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// (C) Copyright Edward Diener 2019
|
||||
|
||||
// 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_UNION_STATIC_DATA
|
||||
// TITLE: C++11 union with static data unavailable
|
||||
// DESCRIPTION: The compiler does not support C++11 union with static data
|
||||
|
||||
namespace boost_no_cxx11_union_static_data {
|
||||
|
||||
union with_static_data
|
||||
{
|
||||
int a;
|
||||
long b;
|
||||
static int sd;
|
||||
};
|
||||
|
||||
int with_static_data::sd = 0;
|
||||
|
||||
int test()
|
||||
{
|
||||
with_static_data wsd;
|
||||
wsd.a = 24;
|
||||
wsd.b = 48L;
|
||||
with_static_data::sd = 1;
|
||||
bool b = (wsd.b == 48L && with_static_data::sd == 1);
|
||||
return b ? 0 : 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1145,6 +1145,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_CXX11_TRAILING_RESULT_TYPES);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_UNICODE_LITERALS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_UNION_STATIC_DATA);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_USER_DEFINED_LITERALS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_MACROS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_VARIADIC_TEMPLATES);
|
||||
@@ -1233,6 +1234,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
|
||||
|
||||
|
||||
|
||||
// END GENERATED BLOCK
|
||||
|
||||
PRINT_MACRO(BOOST_INTEL);
|
||||
|
||||
+11
-1
@@ -1,4 +1,4 @@
|
||||
// This file was automatically generated on Fri Aug 23 11:11:12 2019
|
||||
// This file was automatically generated on Mon Dec 09 09:47:37 2019
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
@@ -792,6 +792,11 @@ namespace boost_no_cxx11_unicode_literals = empty_boost;
|
||||
#else
|
||||
namespace boost_no_cxx11_unified_initialization_syntax = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_UNION_STATIC_DATA
|
||||
#include "boost_no_union_static_data.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_union_static_data = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#include "boost_no_using_breaks_adl.ipp"
|
||||
#else
|
||||
@@ -1971,6 +1976,11 @@ int main( int, char *[] )
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_no_cxx11_union_static_data::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_UNION_STATIC_DATA at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_function_scope_using_declaration_breaks_adl::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Mon Dec 09 09:47:37 2019
|
||||
// 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_UNION_STATIC_DATA
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_CXX11_UNION_STATIC_DATA should not be defined.
|
||||
// See file boost_no_union_static_data.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_UNION_STATIC_DATA
|
||||
#include "boost_no_union_static_data.ipp"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_union_static_data::test();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Mon Dec 09 09:47:37 2019
|
||||
// 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_UNION_STATIC_DATA
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_CXX11_UNION_STATIC_DATA should be defined.
|
||||
// See file boost_no_union_static_data.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_UNION_STATIC_DATA
|
||||
#include "boost_no_union_static_data.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_union_static_data = empty_boost;
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_union_static_data::test();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user