forked from boostorg/config
Apply patches for BOOST_NO_VARIADIC_MACROS supplied by Edward Diener.
[SVN r64858]
This commit is contained in:
1 parent
c3d5e03a89
commit
1a1ed6f02a
26 files changed
+264
-72
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 Jun 04 12:51:35 2010
|
||||
# This file was automatically generated on Tue Aug 17 09:59:01 2010
|
||||
# by libs/config/tools/generate.cpp
|
||||
# Copyright John Maddock.
|
||||
# Use, modification and distribution are subject to the
|
||||
@@ -511,6 +511,9 @@ test-suite "BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE" :
|
||||
test-suite "BOOST_NO_USING_TEMPLATE" :
|
||||
[ run ../no_using_template_pass.cpp ]
|
||||
[ compile-fail ../no_using_template_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_VARIADIC_MACROS" :
|
||||
[ run ../no_variadic_macros_pass.cpp ]
|
||||
[ compile-fail ../no_variadic_macros_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_VARIADIC_TEMPLATES" :
|
||||
[ run ../no_variadic_templates_pass.cpp ]
|
||||
[ compile-fail ../no_variadic_templates_fail.cpp ] ;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
// Copyright (C) 2010 Edward Diener
|
||||
// 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 most recent version.
|
||||
|
||||
// MACRO: BOOST_NO_VARIADIC_MACROS
|
||||
// TITLE: C++0x variadic macros unavailable
|
||||
// DESCRIPTION: The compiler does not support C++0x variadic macros
|
||||
|
||||
// This is a simple test
|
||||
|
||||
#define TEST_VARIADIC_MACRO_SIMPLE(avalue,...) __VA_ARGS__
|
||||
|
||||
/*
|
||||
|
||||
This is a more complicated test, which Steve Watanabe graciously
|
||||
supplied, when I asked if it were possible to strip the parantheses
|
||||
from a macro argument. I have changed the names somewhat to prevent
|
||||
any common clashes with other macros in the config testing suite
|
||||
by prepending to each macro name TEST_VARIADIC_MACRO_.
|
||||
|
||||
You may find this test overdone and may want to remove it.
|
||||
|
||||
*/
|
||||
|
||||
#define TEST_VARIADIC_MACRO_CAT(x, y) TEST_VARIADIC_MACRO_CAT_I(x, y)
|
||||
#define TEST_VARIADIC_MACRO_CAT_I(x, y) x ## y
|
||||
|
||||
#define TEST_VARIADIC_MACRO_APPLY(macro, args) TEST_VARIADIC_MACRO_APPLY_I(macro, args)
|
||||
#define TEST_VARIADIC_MACRO_APPLY_I(macro, args) macro args
|
||||
|
||||
#define TEST_VARIADIC_MACRO_STRIP_PARENS(x) TEST_VARIADIC_MACRO_EVAL((TEST_VARIADIC_MACRO_STRIP_PARENS_I x), x)
|
||||
#define TEST_VARIADIC_MACRO_STRIP_PARENS_I(...) 1,1
|
||||
|
||||
#define TEST_VARIADIC_MACRO_EVAL(test, x) TEST_VARIADIC_MACRO_EVAL_I(test, x)
|
||||
#define TEST_VARIADIC_MACRO_EVAL_I(test, x) TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS(TEST_VARIADIC_MACRO_TEST_ARITY test, x)
|
||||
|
||||
#define TEST_VARIADIC_MACRO_TEST_ARITY(...) TEST_VARIADIC_MACRO_APPLY(TEST_VARIADIC_MACRO_TEST_ARITY_I, (__VA_ARGS__, 2, 1))
|
||||
#define TEST_VARIADIC_MACRO_TEST_ARITY_I(a,b,c,...) c
|
||||
|
||||
#define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS(cond, x) TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_I(cond, x)
|
||||
#define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_I(cond, x) TEST_VARIADIC_MACRO_CAT(TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_, cond)(x)
|
||||
|
||||
#define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_1(x) x
|
||||
#define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2(x) TEST_VARIADIC_MACRO_APPLY(TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2_I, x)
|
||||
#define TEST_VARIADIC_MACRO_MAYBE_STRIP_PARENS_2_I(...) __VA_ARGS__
|
||||
|
||||
namespace boost_no_variadic_macros {
|
||||
|
||||
template<TEST_VARIADIC_MACRO_STRIP_PARENS((typename T,int))> struct test_variadic_macro_class {};
|
||||
|
||||
int test()
|
||||
{
|
||||
|
||||
int x = TEST_VARIADIC_MACRO_STRIP_PARENS(3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1066,6 +1066,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_UNREACHABLE_RETURN_DETECTION);
|
||||
PRINT_MACRO(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE);
|
||||
PRINT_MACRO(BOOST_NO_USING_TEMPLATE);
|
||||
PRINT_MACRO(BOOST_NO_VARIADIC_MACROS);
|
||||
PRINT_MACRO(BOOST_NO_VARIADIC_TEMPLATES);
|
||||
PRINT_MACRO(BOOST_NO_VOID_RETURNS);
|
||||
|
||||
@@ -1084,6 +1085,7 @@ void print_boost_macros()
|
||||
|
||||
|
||||
|
||||
|
||||
// END GENERATED BLOCK
|
||||
|
||||
PRINT_MACRO(BOOST_INTEL);
|
||||
|
||||
+11
-1
@@ -1,4 +1,4 @@
|
||||
// This file was automatically generated on Fri Jun 04 12:51:35 2010
|
||||
// This file was automatically generated on Tue Aug 17 09:59:01 2010
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
@@ -582,6 +582,11 @@ namespace boost_no_using_declaration_overloads_from_typename_base = empty_boost;
|
||||
#else
|
||||
namespace boost_no_using_template = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_VARIADIC_MACROS
|
||||
#include "boost_no_variadic_macros.ipp"
|
||||
#else
|
||||
namespace boost_no_variadic_macros = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_VARIADIC_TEMPLATES
|
||||
#include "boost_no_variadic_templates.ipp"
|
||||
#else
|
||||
@@ -1671,6 +1676,11 @@ int main( int, char *[] )
|
||||
std::cerr << "Failed test for BOOST_NO_USING_TEMPLATE at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_no_variadic_macros::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_VARIADIC_MACROS at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_no_variadic_templates::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_VARIADIC_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Tue Aug 17 09:59:01 2010
|
||||
// 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: generate.cpp 49281 2008-10-11 15:40:44Z johnmaddock $
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_VARIADIC_MACROS
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_VARIADIC_MACROS should not be defined.
|
||||
// See file boost_no_variadic_macros.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_VARIADIC_MACROS
|
||||
#include "boost_no_variadic_macros.ipp"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_variadic_macros::test();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Tue Aug 17 09:59:01 2010
|
||||
// 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: generate.cpp 49281 2008-10-11 15:40:44Z johnmaddock $
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_VARIADIC_MACROS
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_VARIADIC_MACROS should be defined.
|
||||
// See file boost_no_variadic_macros.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_VARIADIC_MACROS
|
||||
#include "boost_no_variadic_macros.ipp"
|
||||
#else
|
||||
namespace boost_no_variadic_macros = empty_boost;
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_variadic_macros::test();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user