forked from boostorg/config
Added new config macro: BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
[SVN r18507]
This commit is contained in:
2631
config.htm
2631
config.htm
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Regression test Jamfile for boost configuration setup.
|
# Regression test Jamfile for boost configuration setup.
|
||||||
# This file was automatically generated on Thu Feb 13 12:10:01 GMTST 2003,
|
# This file was automatically generated on Fri May 23 11:49:09 GMTST 2003,
|
||||||
# do not edit by hand...
|
# do not edit by hand...
|
||||||
#
|
#
|
||||||
subproject libs/config/test ;
|
subproject libs/config/test ;
|
||||||
@ -150,6 +150,9 @@ test-suite "BOOST_NO_SWPRINTF" :
|
|||||||
test-suite "BOOST_NO_TEMPLATE_TEMPLATES" :
|
test-suite "BOOST_NO_TEMPLATE_TEMPLATES" :
|
||||||
[ run no_template_template_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]
|
[ run no_template_template_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]
|
||||||
[ compile-fail no_template_template_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;
|
[ compile-fail no_template_template_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;
|
||||||
|
test-suite "BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE" :
|
||||||
|
[ run no_using_decl_overld_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]
|
||||||
|
[ compile-fail no_using_decl_overld_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;
|
||||||
test-suite "BOOST_NO_USING_TEMPLATE" :
|
test-suite "BOOST_NO_USING_TEMPLATE" :
|
||||||
[ run no_using_template_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]
|
[ run no_using_template_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]
|
||||||
[ compile-fail no_using_template_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;
|
[ compile-fail no_using_template_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;
|
||||||
|
33
test/boost_no_using_decl_overld.ipp
Normal file
33
test/boost_no_using_decl_overld.ipp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// (C) Copyright Eric Friedman 2002. Permission to copy, use, modify, sell and
|
||||||
|
// distribute this software is granted provided this copyright notice appears
|
||||||
|
// in all copies. This software is provided "as is" without express or implied
|
||||||
|
// warranty, and with no claim as to its suitability for any purpose.
|
||||||
|
|
||||||
|
// MACRO: BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
// TITLE: using declaration function overloads from a typename base
|
||||||
|
// DESCRIPTION: The compiler will not accept a using declaration
|
||||||
|
// that brings a function from a typename used as a base class
|
||||||
|
// into a derived class if functions of the same name
|
||||||
|
// are present in the derived class.
|
||||||
|
|
||||||
|
namespace boost_no_using_declaration_overloads_from_typename_base {
|
||||||
|
|
||||||
|
struct base
|
||||||
|
{
|
||||||
|
static void f() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T, typename Base>
|
||||||
|
struct using_overloads_from_typename_base : Base
|
||||||
|
{
|
||||||
|
using Base::f;
|
||||||
|
static T f(const T& t) { return t; }
|
||||||
|
};
|
||||||
|
|
||||||
|
int test()
|
||||||
|
{
|
||||||
|
using_overloads_from_typename_base<int,base>::f();
|
||||||
|
return using_overloads_from_typename_base<int,base>::f(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
// Do not edit this file, it was generated automatically by
|
// Do not edit this file, it was generated automatically by
|
||||||
// ../tools/generate from boost_*.cxx on
|
// ../tools/generate from boost_*.cxx on
|
||||||
// Thu Feb 13 12:10:01 GMTST 2003
|
// Fri May 23 11:49:09 GMTST 2003
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#define BOOST_INCLUDE_MAIN
|
#define BOOST_INCLUDE_MAIN
|
||||||
@ -247,6 +247,11 @@ namespace boost_no_swprintf = empty_boost;
|
|||||||
#else
|
#else
|
||||||
namespace boost_no_template_templates = empty_boost;
|
namespace boost_no_template_templates = empty_boost;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
#include "boost_no_using_decl_overld.cxx"
|
||||||
|
#else
|
||||||
|
namespace boost_no_using_declaration_overloads_from_typename_base = empty_boost;
|
||||||
|
#endif
|
||||||
#ifndef BOOST_NO_USING_TEMPLATE
|
#ifndef BOOST_NO_USING_TEMPLATE
|
||||||
#include "boost_no_using_template.cxx"
|
#include "boost_no_using_template.cxx"
|
||||||
#else
|
#else
|
||||||
@ -408,6 +413,7 @@ int test_main( int, char *[] )
|
|||||||
BOOST_TEST(0 == boost_no_intrinsic_wchar_t::test());
|
BOOST_TEST(0 == boost_no_intrinsic_wchar_t::test());
|
||||||
BOOST_TEST(0 == boost_no_void_returns::test());
|
BOOST_TEST(0 == boost_no_void_returns::test());
|
||||||
BOOST_TEST(0 == boost_no_using_template::test());
|
BOOST_TEST(0 == boost_no_using_template::test());
|
||||||
|
BOOST_TEST(0 == boost_no_using_declaration_overloads_from_typename_base::test());
|
||||||
BOOST_TEST(0 == boost_no_template_templates::test());
|
BOOST_TEST(0 == boost_no_template_templates::test());
|
||||||
BOOST_TEST(0 == boost_no_swprintf::test());
|
BOOST_TEST(0 == boost_no_swprintf::test());
|
||||||
BOOST_TEST(0 == boost_no_stdc_namespace::test());
|
BOOST_TEST(0 == boost_no_stdc_namespace::test());
|
||||||
|
35
test/no_using_decl_overld_fail.cpp
Normal file
35
test/no_using_decl_overld_fail.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||||
|
// distribute this software is granted provided this copyright notice appears
|
||||||
|
// in all copies. This software is provided "as is" without express or implied
|
||||||
|
// warranty, and with no claim as to its suitability for any purpose.
|
||||||
|
|
||||||
|
// Test file for macro BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
// This file should not compile, if it does then
|
||||||
|
// BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE need not be defined.
|
||||||
|
// see boost_no_using_decl_overld.cxx for more details
|
||||||
|
|
||||||
|
// Do not edit this file, it was generated automatically by
|
||||||
|
// ../tools/generate from boost_no_using_decl_overld.cxx on
|
||||||
|
// Fri May 23 11:39:30 GMTST 2003
|
||||||
|
|
||||||
|
// 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_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
#include "boost_no_using_decl_overld.cxx"
|
||||||
|
#else
|
||||||
|
#error "this file should not compile"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int cpp_main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_using_declaration_overloads_from_typename_base::test();
|
||||||
|
}
|
||||||
|
|
35
test/no_using_decl_overld_pass.cpp
Normal file
35
test/no_using_decl_overld_pass.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||||
|
// distribute this software is granted provided this copyright notice appears
|
||||||
|
// in all copies. This software is provided "as is" without express or implied
|
||||||
|
// warranty, and with no claim as to its suitability for any purpose.
|
||||||
|
|
||||||
|
// Test file for macro BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
// This file should compile, if it does not then
|
||||||
|
// BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE needs to be defined.
|
||||||
|
// see boost_no_using_decl_overld.cxx for more details
|
||||||
|
|
||||||
|
// Do not edit this file, it was generated automatically by
|
||||||
|
// ../tools/generate from boost_no_using_decl_overld.cxx on
|
||||||
|
// Fri May 23 11:39:30 GMTST 2003
|
||||||
|
|
||||||
|
// 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_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||||
|
#include "boost_no_using_decl_overld.cxx"
|
||||||
|
#else
|
||||||
|
namespace boost_no_using_declaration_overloads_from_typename_base = empty_boost;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int cpp_main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_using_declaration_overloads_from_typename_base::test();
|
||||||
|
}
|
||||||
|
|
@ -175,7 +175,7 @@ EOF
|
|||||||
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
|
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
|
||||||
|
|
||||||
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
|
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
|
||||||
echo "[ run $basename""_pass.cpp <lib>../../test/build/prg_exec_monitor ]" >> ../test/Jamfile
|
echo "[ run $basename""_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]" >> ../test/Jamfile
|
||||||
echo "[ compile-fail $basename""_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;" >> ../test/Jamfile
|
echo "[ compile-fail $basename""_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;" >> ../test/Jamfile
|
||||||
|
|
||||||
done
|
done
|
||||||
@ -299,7 +299,7 @@ EOF
|
|||||||
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
|
echo "compile-fail libs/config/test/$basename""_fail.cpp" >> ../test/regression.cfg
|
||||||
|
|
||||||
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
|
echo 'test-suite "'$macroname'" : ' >> ../test/Jamfile
|
||||||
echo "[ run $basename""_pass.cpp <lib>../../test/build/prg_exec_monitor ]" >> ../test/Jamfile
|
echo "[ run $basename""_pass.cpp <lib>../../test/build/boost_prg_exec_monitor ]" >> ../test/Jamfile
|
||||||
echo "[ compile-fail $basename""_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;" >> ../test/Jamfile
|
echo "[ compile-fail $basename""_fail.cpp <lib>../../test/build/boost_prg_exec_monitor ] ;" >> ../test/Jamfile
|
||||||
|
|
||||||
done
|
done
|
||||||
@ -351,3 +351,4 @@ echo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user