Ticket #2327: libs_config2.patch

File libs_config2.patch, 14.6 KB (added by Nicola Musatti, 14 years ago)
  • doc/macro_reference.qbk

     
    171171specializations as a standard library "fix", only if the compiler supports
    172172the `__int64` datatype.
    173173]]
     174[[`BOOST_NO_NESTED_FRIENDSHIP`][Compiler][
     175Compiler doesn't allow a nested class to access private members of its
     176containing class. Probably Borland/CodeGear specific.
     177]]
    174178[[`BOOST_NO_OPERATORS_IN_NAMESPACE`][Compiler][
    175179Compiler requires inherited operator friend functions to be defined at
    176180namespace scope, then using'ed to boost. Probably GCC specific. See
     
    271275[[`BOOST_NO_TYPEID`][Compiler][
    272276The compiler does not support the typeid operator at all.
    273277]]
     278[[`BOOST_NO_TYPENAME_WITH_CTOR`][Compiler][
     279The typename keyword cannot be used when creating a temporary of a
     280Dependent type.
     281]]
    274282[[`BOOST_NO_UNREACHABLE_RETURN_DETECTION`][Compiler][
    275283If a return is unreachable, then no return statement should be required,
    276284however some compilers insist on it, while other issue a bunch of warnings
  • test/all/Jamfile.v2

     
    11#
    22# Regression test Jamfile for boost configuration setup.
    33# *** DO NOT EDIT THIS FILE BY HAND ***
    4 # This file was automatically generated on Mon Aug 25 10:51:52 2008
     4# This file was automatically generated on Thu Sep 18 23:32:18 2008
    55#  by libs/config/tools/generate.cpp
    66# Copyright John Maddock.
    77# Use, modification and distribution are subject to the
     
    274274test-suite "BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS" :
    275275[ run ../no_mem_tem_pnts_pass.cpp ]
    276276[ compile-fail ../no_mem_tem_pnts_fail.cpp ] ;
     277test-suite "BOOST_NO_NESTED_FRIENDSHIP" :
     278[ run ../no_nested_friendship_pass.cpp ]
     279[ compile-fail ../no_nested_friendship_fail.cpp ] ;
    277280test-suite "BOOST_NO_OPERATORS_IN_NAMESPACE" :
    278281[ run ../no_ops_in_namespace_pass.cpp ]
    279282[ compile-fail ../no_ops_in_namespace_fail.cpp ] ;
     
    355358test-suite "BOOST_NO_TYPEID" :
    356359[ run ../no_typeid_pass.cpp ]
    357360[ compile-fail ../no_typeid_fail.cpp ] ;
     361test-suite "BOOST_NO_TYPENAME_WITH_CTOR" :
     362[ run ../no_typename_with_ctor_pass.cpp ]
     363[ compile-fail ../no_typename_with_ctor_fail.cpp ] ;
    358364test-suite "BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL" :
    359365[ run ../no_using_breaks_adl_pass.cpp ]
    360366[ compile-fail ../no_using_breaks_adl_fail.cpp ] ;
  • test/boost_no_is_abstract.ipp

     
    1212
    1313namespace boost_no_is_abstract{
    1414
     15#if defined(__CODEGEARC__)
    1516template<class T>
    1617struct is_abstract_test
    1718{
    18    // Deduction fails if T is void, function type,
    19    // reference type (14.8.2/2)or an abstract class type
     19   enum{ value = __is_abstract(T) };
     20};
     21#else
     22template<class T>
     23struct is_abstract_test
     24{
     25   // Deduction fails if T is void, function type,
     26   // reference type (14.8.2/2)or an abstract class type
    2027   // according to review status issue #337
    2128   //
    2229   template<class U>
     
    2936#else
    3037   enum{ s1 = sizeof(check_sig<T>(0)) };
    3138#endif
    32    
     39
    3340   enum{ value = (s1 == sizeof(char)) };
    3441};
     42#endif
    3543
    3644struct non_abstract{};
    3745struct abstract{ virtual void foo() = 0; };
  • test/boost_no_nested_friendship.ipp

     
     1//  MACRO:         BOOST_NO_NESTED_FRIENDSHIP
     2//  TITLE:         Access to private members from nested classes
     3//  DESCRIPTION:   If the compiler fails to support access to private members
     4//                 from nested classes
     5
     6namespace boost_no_nested_friendship {
     7
     8class A {
     9   static int b;
     10   class B {
     11      int f() { return b; }
     12   };
     13};
     14
     15int test()
     16{
     17    return 0;
     18}
     19
     20}
     21
  • test/boost_no_typename_with_ctor.ipp

    Property changes on: test\boost_no_nested_friendship.ipp
    ___________________________________________________________________
    Name: svn:mime-type
       + text/plain
    Name: svn:keywords
       + Id
    Name: svn:eol-style
       + native
    
     
     1//  MACRO:         BOOST_NO_TYPENAME_WITH_CTOR
     2//  TITLE:         Use of typename keyword with constructors
     3//  DESCRIPTION:   If the compiler rejects the typename keyword when calling
     4//                 the constructor of a dependent type
     5
     6namespace boost_no_typename_with_ctor {
     7
     8struct A {};
     9
     10template <typename T>
     11struct B {
     12  typedef T type;
     13};
     14
     15template <typename T>
     16typename T::type f() {
     17  return typename T::type();
     18}
     19
     20int test() {
     21  A a = f<B<A> >();
     22  return 0;
     23}
     24
     25}
     26
  • test/config_info.cpp

    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
    
     
    982982   PRINT_MACRO(BOOST_NO_MEMBER_TEMPLATE_FRIENDS);
    983983   PRINT_MACRO(BOOST_NO_MEMBER_TEMPLATE_KEYWORD);
    984984   PRINT_MACRO(BOOST_NO_MS_INT64_NUMERIC_LIMITS);
     985   PRINT_MACRO(BOOST_NO_NESTED_FRIENDSHIP);
    985986   PRINT_MACRO(BOOST_NO_OPERATORS_IN_NAMESPACE);
    986987   PRINT_MACRO(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS);
    987988   PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_CONST);
     
    10101011   PRINT_MACRO(BOOST_NO_TEMPLATE_TEMPLATES);
    10111012   PRINT_MACRO(BOOST_NO_TWO_PHASE_NAME_LOOKUP);
    10121013   PRINT_MACRO(BOOST_NO_TYPEID);
     1014   PRINT_MACRO(BOOST_NO_TYPENAME_WITH_CTOR);
    10131015   PRINT_MACRO(BOOST_NO_UNREACHABLE_RETURN_DETECTION);
    10141016   PRINT_MACRO(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE);
    10151017   PRINT_MACRO(BOOST_NO_USING_TEMPLATE);
     
    10371039
    10381040
    10391041
     1042
    10401043   // END GENERATED BLOCK
    10411044
    10421045   PRINT_MACRO(BOOST_INTEL);
  • test/config_test.cpp

     
    1 //  This file was automatically generated on Mon Aug 25 10:51:52 2008
     1//  This file was automatically generated on Thu Sep 18 23:32:18 2008
    22//  by libs/config/tools/generate.cpp
    33//  Copyright John Maddock 2002-4.
    44//  Use, modification and distribution are subject to the
     
    187187#else
    188188namespace boost_no_pointer_to_member_template_parameters = empty_boost;
    189189#endif
     190#ifndef BOOST_NO_NESTED_FRIENDSHIP
     191#include "boost_no_nested_friendship.ipp"
     192#else
     193namespace boost_no_nested_friendship = empty_boost;
     194#endif
    190195#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
    191196#include "boost_no_ops_in_namespace.ipp"
    192197#else
     
    322327#else
    323328namespace boost_no_typeid = empty_boost;
    324329#endif
     330#ifndef BOOST_NO_TYPENAME_WITH_CTOR
     331#include "boost_no_typename_with_ctor.ipp"
     332#else
     333namespace boost_no_typename_with_ctor = empty_boost;
     334#endif
    325335#ifndef BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
    326336#include "boost_no_using_breaks_adl.ipp"
    327337#else
     
    10261036      std::cerr << "Failed test for BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS at: " << __FILE__ << ":" << __LINE__ << std::endl;
    10271037      ++error_count;
    10281038   }
     1039   if(0 != boost_no_nested_friendship::test())
     1040   {
     1041      std::cerr << "Failed test for BOOST_NO_NESTED_FRIENDSHIP at: " << __FILE__ << ":" << __LINE__ << std::endl;
     1042      ++error_count;
     1043   }
    10291044   if(0 != boost_no_operators_in_namespace::test())
    10301045   {
    10311046      std::cerr << "Failed test for BOOST_NO_OPERATORS_IN_NAMESPACE at: " << __FILE__ << ":" << __LINE__ << std::endl;
     
    11611176      std::cerr << "Failed test for BOOST_NO_TYPEID at: " << __FILE__ << ":" << __LINE__ << std::endl;
    11621177      ++error_count;
    11631178   }
     1179   if(0 != boost_no_typename_with_ctor::test())
     1180   {
     1181      std::cerr << "Failed test for BOOST_NO_TYPENAME_WITH_CTOR at: " << __FILE__ << ":" << __LINE__ << std::endl;
     1182      ++error_count;
     1183   }
    11641184   if(0 != boost_function_scope_using_declaration_breaks_adl::test())
    11651185   {
    11661186      std::cerr << "Failed test for BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL at: " << __FILE__ << ":" << __LINE__ << std::endl;
  • test/no_nested_friendship_fail.cpp

     
     1//  This file was automatically generated on Thu Sep 18 23:32:18 2008
     2//  by libs/config/tools/generate.cpp
     3//  Copyright John Maddock 2002-4.
     4//  Use, modification and distribution are subject to the
     5//  Boost Software License, Version 1.0. (See accompanying file
     6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     7
     8//  See http://www.boost.org/libs/config for the most recent version.//
     9//  Revision $Id$
     10//
     11
     12
     13// Test file for macro BOOST_NO_NESTED_FRIENDSHIP
     14// This file should not compile, if it does then
     15// BOOST_NO_NESTED_FRIENDSHIP should not be defined.
     16// See file boost_no_nested_friendship.ipp for details
     17
     18// Must not have BOOST_ASSERT_CONFIG set; it defeats
     19// the objective of this file:
     20#ifdef BOOST_ASSERT_CONFIG
     21#  undef BOOST_ASSERT_CONFIG
     22#endif
     23
     24#include <boost/config.hpp>
     25#include "test.hpp"
     26
     27#ifdef BOOST_NO_NESTED_FRIENDSHIP
     28#include "boost_no_nested_friendship.ipp"
     29#else
     30#error "this file should not compile"
     31#endif
     32
     33int main( int, char *[] )
     34{
     35   return boost_no_nested_friendship::test();
     36}
     37
  • test/no_nested_friendship_pass.cpp

    Property changes on: test\no_nested_friendship_fail.cpp
    ___________________________________________________________________
    Name: svn:mime-type
       + text/plain
    Name: svn:keywords
       + Id
    Name: svn:eol-style
       + native
    
     
     1//  This file was automatically generated on Thu Sep 18 23:32:18 2008
     2//  by libs/config/tools/generate.cpp
     3//  Copyright John Maddock 2002-4.
     4//  Use, modification and distribution are subject to the
     5//  Boost Software License, Version 1.0. (See accompanying file
     6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     7
     8//  See http://www.boost.org/libs/config for the most recent version.//
     9//  Revision $Id$
     10//
     11
     12
     13// Test file for macro BOOST_NO_NESTED_FRIENDSHIP
     14// This file should compile, if it does not then
     15// BOOST_NO_NESTED_FRIENDSHIP should be defined.
     16// See file boost_no_nested_friendship.ipp for details
     17
     18// Must not have BOOST_ASSERT_CONFIG set; it defeats
     19// the objective of this file:
     20#ifdef BOOST_ASSERT_CONFIG
     21#  undef BOOST_ASSERT_CONFIG
     22#endif
     23
     24#include <boost/config.hpp>
     25#include "test.hpp"
     26
     27#ifndef BOOST_NO_NESTED_FRIENDSHIP
     28#include "boost_no_nested_friendship.ipp"
     29#else
     30namespace boost_no_nested_friendship = empty_boost;
     31#endif
     32
     33int main( int, char *[] )
     34{
     35   return boost_no_nested_friendship::test();
     36}
     37
  • test/no_typename_with_ctor_fail.cpp

    Property changes on: test\no_nested_friendship_pass.cpp
    ___________________________________________________________________
    Name: svn:mime-type
       + text/plain
    Name: svn:keywords
       + Id
    Name: svn:eol-style
       + native
    
     
     1//  This file was automatically generated on Thu Sep 18 23:32:18 2008
     2//  by libs/config/tools/generate.cpp
     3//  Copyright John Maddock 2002-4.
     4//  Use, modification and distribution are subject to the
     5//  Boost Software License, Version 1.0. (See accompanying file
     6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     7
     8//  See http://www.boost.org/libs/config for the most recent version.//
     9//  Revision $Id$
     10//
     11
     12
     13// Test file for macro BOOST_NO_TYPENAME_WITH_CTOR
     14// This file should not compile, if it does then
     15// BOOST_NO_TYPENAME_WITH_CTOR should not be defined.
     16// See file boost_no_typename_with_ctor.ipp for details
     17
     18// Must not have BOOST_ASSERT_CONFIG set; it defeats
     19// the objective of this file:
     20#ifdef BOOST_ASSERT_CONFIG
     21#  undef BOOST_ASSERT_CONFIG
     22#endif
     23
     24#include <boost/config.hpp>
     25#include "test.hpp"
     26
     27#ifdef BOOST_NO_TYPENAME_WITH_CTOR
     28#include "boost_no_typename_with_ctor.ipp"
     29#else
     30#error "this file should not compile"
     31#endif
     32
     33int main( int, char *[] )
     34{
     35   return boost_no_typename_with_ctor::test();
     36}
     37
  • test/no_typename_with_ctor_pass.cpp

    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
    
     
     1//  This file was automatically generated on Thu Sep 18 23:32:18 2008
     2//  by libs/config/tools/generate.cpp
     3//  Copyright John Maddock 2002-4.
     4//  Use, modification and distribution are subject to the
     5//  Boost Software License, Version 1.0. (See accompanying file
     6//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
     7
     8//  See http://www.boost.org/libs/config for the most recent version.//
     9//  Revision $Id$
     10//
     11
     12
     13// Test file for macro BOOST_NO_TYPENAME_WITH_CTOR
     14// This file should compile, if it does not then
     15// BOOST_NO_TYPENAME_WITH_CTOR should be defined.
     16// See file boost_no_typename_with_ctor.ipp for details
     17
     18// Must not have BOOST_ASSERT_CONFIG set; it defeats
     19// the objective of this file:
     20#ifdef BOOST_ASSERT_CONFIG
     21#  undef BOOST_ASSERT_CONFIG
     22#endif
     23
     24#include <boost/config.hpp>
     25#include "test.hpp"
     26
     27#ifndef BOOST_NO_TYPENAME_WITH_CTOR
     28#include "boost_no_typename_with_ctor.ipp"
     29#else
     30namespace boost_no_typename_with_ctor = empty_boost;
     31#endif
     32
     33int main( int, char *[] )
     34{
     35   return boost_no_typename_with_ctor::test();
     36}
     37