Index: doc/macro_reference.qbk =================================================================== --- doc/macro_reference.qbk (revision 3) +++ doc/macro_reference.qbk (working copy) @@ -171,6 +171,10 @@ specializations as a standard library "fix", only if the compiler supports the `__int64` datatype. ]] +[[`BOOST_NO_NESTED_FRIENDSHIP`][Compiler][ +Compiler doesn't allow a nested class to access private members of its +containing class. Probably Borland/CodeGear specific. +]] [[`BOOST_NO_OPERATORS_IN_NAMESPACE`][Compiler][ Compiler requires inherited operator friend functions to be defined at namespace scope, then using'ed to boost. Probably GCC specific. See @@ -271,6 +275,10 @@ [[`BOOST_NO_TYPEID`][Compiler][ The compiler does not support the typeid operator at all. ]] +[[`BOOST_NO_TYPENAME_WITH_CTOR`][Compiler][ +The typename keyword cannot be used when creating a temporary of a +Dependent type. +]] [[`BOOST_NO_UNREACHABLE_RETURN_DETECTION`][Compiler][ If a return is unreachable, then no return statement should be required, however some compilers insist on it, while other issue a bunch of warnings Index: test/all/Jamfile.v2 =================================================================== --- test/all/Jamfile.v2 (revision 3) +++ test/all/Jamfile.v2 (working copy) @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Mon Aug 25 10:51:52 2008 +# This file was automatically generated on Thu Sep 18 23:32:18 2008 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -274,6 +274,9 @@ test-suite "BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS" : [ run ../no_mem_tem_pnts_pass.cpp ] [ compile-fail ../no_mem_tem_pnts_fail.cpp ] ; +test-suite "BOOST_NO_NESTED_FRIENDSHIP" : +[ run ../no_nested_friendship_pass.cpp ] +[ compile-fail ../no_nested_friendship_fail.cpp ] ; test-suite "BOOST_NO_OPERATORS_IN_NAMESPACE" : [ run ../no_ops_in_namespace_pass.cpp ] [ compile-fail ../no_ops_in_namespace_fail.cpp ] ; @@ -355,6 +358,9 @@ test-suite "BOOST_NO_TYPEID" : [ run ../no_typeid_pass.cpp ] [ compile-fail ../no_typeid_fail.cpp ] ; +test-suite "BOOST_NO_TYPENAME_WITH_CTOR" : +[ run ../no_typename_with_ctor_pass.cpp ] +[ compile-fail ../no_typename_with_ctor_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 ] ; Index: test/boost_no_is_abstract.ipp =================================================================== --- test/boost_no_is_abstract.ipp (revision 3) +++ test/boost_no_is_abstract.ipp (working copy) @@ -12,11 +12,18 @@ namespace boost_no_is_abstract{ +#if defined(__CODEGEARC__) template struct is_abstract_test { - // Deduction fails if T is void, function type, - // reference type (14.8.2/2)or an abstract class type + enum{ value = __is_abstract(T) }; +}; +#else +template +struct is_abstract_test +{ + // Deduction fails if T is void, function type, + // reference type (14.8.2/2)or an abstract class type // according to review status issue #337 // template @@ -29,9 +36,10 @@ #else enum{ s1 = sizeof(check_sig(0)) }; #endif - + enum{ value = (s1 == sizeof(char)) }; }; +#endif struct non_abstract{}; struct abstract{ virtual void foo() = 0; }; Index: test/boost_no_nested_friendship.ipp =================================================================== --- test/boost_no_nested_friendship.ipp (revision 0) +++ test/boost_no_nested_friendship.ipp (revision 0) @@ -0,0 +1,21 @@ +// MACRO: BOOST_NO_NESTED_FRIENDSHIP +// TITLE: Access to private members from nested classes +// DESCRIPTION: If the compiler fails to support access to private members +// from nested classes + +namespace boost_no_nested_friendship { + +class A { + static int b; + class B { + int f() { return b; } + }; +}; + +int test() +{ + return 0; +} + +} + Property changes on: test\boost_no_nested_friendship.ipp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Index: test/boost_no_typename_with_ctor.ipp =================================================================== --- test/boost_no_typename_with_ctor.ipp (revision 0) +++ test/boost_no_typename_with_ctor.ipp (revision 0) @@ -0,0 +1,26 @@ +// MACRO: BOOST_NO_TYPENAME_WITH_CTOR +// TITLE: Use of typename keyword with constructors +// DESCRIPTION: If the compiler rejects the typename keyword when calling +// the constructor of a dependent type + +namespace boost_no_typename_with_ctor { + +struct A {}; + +template +struct B { + typedef T type; +}; + +template +typename T::type f() { + return typename T::type(); +} + +int test() { + A a = f >(); + return 0; +} + +} + Property changes on: test\boost_no_typename_with_ctor.ipp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Index: test/config_info.cpp =================================================================== --- test/config_info.cpp (revision 3) +++ test/config_info.cpp (working copy) @@ -982,6 +982,7 @@ PRINT_MACRO(BOOST_NO_MEMBER_TEMPLATE_FRIENDS); PRINT_MACRO(BOOST_NO_MEMBER_TEMPLATE_KEYWORD); PRINT_MACRO(BOOST_NO_MS_INT64_NUMERIC_LIMITS); + PRINT_MACRO(BOOST_NO_NESTED_FRIENDSHIP); PRINT_MACRO(BOOST_NO_OPERATORS_IN_NAMESPACE); PRINT_MACRO(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS); PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_CONST); @@ -1010,6 +1011,7 @@ PRINT_MACRO(BOOST_NO_TEMPLATE_TEMPLATES); PRINT_MACRO(BOOST_NO_TWO_PHASE_NAME_LOOKUP); PRINT_MACRO(BOOST_NO_TYPEID); + PRINT_MACRO(BOOST_NO_TYPENAME_WITH_CTOR); PRINT_MACRO(BOOST_NO_UNREACHABLE_RETURN_DETECTION); PRINT_MACRO(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE); PRINT_MACRO(BOOST_NO_USING_TEMPLATE); @@ -1037,6 +1039,7 @@ + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); Index: test/config_test.cpp =================================================================== --- test/config_test.cpp (revision 3) +++ test/config_test.cpp (working copy) @@ -1,4 +1,4 @@ -// This file was automatically generated on Mon Aug 25 10:51:52 2008 +// This file was automatically generated on Thu Sep 18 23:32:18 2008 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -187,6 +187,11 @@ #else namespace boost_no_pointer_to_member_template_parameters = empty_boost; #endif +#ifndef BOOST_NO_NESTED_FRIENDSHIP +#include "boost_no_nested_friendship.ipp" +#else +namespace boost_no_nested_friendship = empty_boost; +#endif #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE #include "boost_no_ops_in_namespace.ipp" #else @@ -322,6 +327,11 @@ #else namespace boost_no_typeid = empty_boost; #endif +#ifndef BOOST_NO_TYPENAME_WITH_CTOR +#include "boost_no_typename_with_ctor.ipp" +#else +namespace boost_no_typename_with_ctor = empty_boost; +#endif #ifndef BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #include "boost_no_using_breaks_adl.ipp" #else @@ -1026,6 +1036,11 @@ std::cerr << "Failed test for BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_nested_friendship::test()) + { + std::cerr << "Failed test for BOOST_NO_NESTED_FRIENDSHIP at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_operators_in_namespace::test()) { std::cerr << "Failed test for BOOST_NO_OPERATORS_IN_NAMESPACE at: " << __FILE__ << ":" << __LINE__ << std::endl; @@ -1161,6 +1176,11 @@ std::cerr << "Failed test for BOOST_NO_TYPEID at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_typename_with_ctor::test()) + { + std::cerr << "Failed test for BOOST_NO_TYPENAME_WITH_CTOR 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; Index: test/no_nested_friendship_fail.cpp =================================================================== --- test/no_nested_friendship_fail.cpp (revision 0) +++ test/no_nested_friendship_fail.cpp (revision 0) @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Sep 18 23:32:18 2008 +// 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_NESTED_FRIENDSHIP +// This file should not compile, if it does then +// BOOST_NO_NESTED_FRIENDSHIP should not be defined. +// See file boost_no_nested_friendship.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 +#include "test.hpp" + +#ifdef BOOST_NO_NESTED_FRIENDSHIP +#include "boost_no_nested_friendship.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_nested_friendship::test(); +} + Property changes on: test\no_nested_friendship_fail.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Index: test/no_nested_friendship_pass.cpp =================================================================== --- test/no_nested_friendship_pass.cpp (revision 0) +++ test/no_nested_friendship_pass.cpp (revision 0) @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Sep 18 23:32:18 2008 +// 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_NESTED_FRIENDSHIP +// This file should compile, if it does not then +// BOOST_NO_NESTED_FRIENDSHIP should be defined. +// See file boost_no_nested_friendship.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 +#include "test.hpp" + +#ifndef BOOST_NO_NESTED_FRIENDSHIP +#include "boost_no_nested_friendship.ipp" +#else +namespace boost_no_nested_friendship = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_nested_friendship::test(); +} + Property changes on: test\no_nested_friendship_pass.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Index: test/no_typename_with_ctor_fail.cpp =================================================================== --- test/no_typename_with_ctor_fail.cpp (revision 0) +++ test/no_typename_with_ctor_fail.cpp (revision 0) @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Sep 18 23:32:18 2008 +// 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_TYPENAME_WITH_CTOR +// This file should not compile, if it does then +// BOOST_NO_TYPENAME_WITH_CTOR should not be defined. +// See file boost_no_typename_with_ctor.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 +#include "test.hpp" + +#ifdef BOOST_NO_TYPENAME_WITH_CTOR +#include "boost_no_typename_with_ctor.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_typename_with_ctor::test(); +} + Property changes on: test\no_typename_with_ctor_fail.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Index: test/no_typename_with_ctor_pass.cpp =================================================================== --- test/no_typename_with_ctor_pass.cpp (revision 0) +++ test/no_typename_with_ctor_pass.cpp (revision 0) @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Sep 18 23:32:18 2008 +// 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_TYPENAME_WITH_CTOR +// This file should compile, if it does not then +// BOOST_NO_TYPENAME_WITH_CTOR should be defined. +// See file boost_no_typename_with_ctor.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 +#include "test.hpp" + +#ifndef BOOST_NO_TYPENAME_WITH_CTOR +#include "boost_no_typename_with_ctor.ipp" +#else +namespace boost_no_typename_with_ctor = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_typename_with_ctor::test(); +} + Property changes on: test\no_typename_with_ctor_pass.cpp ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native