Merge changes from Trunk: mainly fixes for the new Codegear compiler, plus a fix to the ABI code for 64-bit MSVC.

[SVN r49212]
This commit is contained in:
John Maddock
2008-10-09 16:08:03 +00:00
parent b47cfe8c7b
commit c7e2cb149e
18 changed files with 317 additions and 17 deletions

View File

@ -650,6 +650,24 @@
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_NESTED_FRIENDSHIP</span></code>
</p>
</td>
<td>
<p>
Compiler
</p>
</td>
<td>
<p>
Compiler doesn't allow a nested class to access private members of
its containing class. Probably Borland/CodeGear specific.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_OPERATORS_IN_NAMESPACE</span></code>
@ -1134,6 +1152,24 @@
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_TYPENAME_WITH_CTOR</span></code>
</p>
</td>
<td>
<p>
Compiler
</p>
</td>
<td>
<p>
The typename keyword cannot be used when creating a temporary of
a Dependent type.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_UNREACHABLE_RETURN_DETECTION</span></code>

View File

@ -962,7 +962,7 @@
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: August 25, 2008 at 09:59:24 GMT</small></p></td>
<td align="left"><p><small>Last revised: September 19, 2008 at 12:01:08 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@ -171,6 +171,10 @@ There is no specialization for `numeric_limits<__int64>` and
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 @@ The compiler does not support template template parameters.
[[`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

View File

@ -3,6 +3,20 @@
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma pack(push,8)
//
// Boost binaries are built with the compiler's default ABI settings,
// if the user changes their default alignment in the VS IDE then their
// code will no longer be binary compatible with the bjam built binaries
// unless this header is included to force Boost code into a consistent ABI.
//
// Note that inclusion of this header is only necessary for libraries with
// separate source, header only libraries DO NOT need this as long as all
// translation units are built with the same options.
//
#if defined(_M_X64)
# pragma pack(push,16)
#else
# pragma pack(push,8)
#endif

View File

@ -40,10 +40,11 @@
// we shouldn't really need this - but too many things choke
// without it, this needs more investigation:
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
// Still need tests writing
// # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
// # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
// Temporary hack, until specific MPL preprocessed headers are generated
# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
# ifdef NDEBUG
// fix broken <cstring> so that Boost.test works:

View File

@ -152,6 +152,11 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#endif
// Intel on Altix Itanium
#if defined(__itanium__) && defined(__INTEL_COMPILER)
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#endif
//
// last known and checked version:
#if (BOOST_INTEL_CXX_VERSION > 1010)

View File

@ -75,6 +75,10 @@
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_NO_ADL_BARRIER
#if(__SUNPRO_CC >= 0x590)
# define BOOST_HAS_LONG_LONG
#endif
#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)

View File

@ -442,6 +442,12 @@ namespace std {
# define BOOST_DEDUCED_TYPENAME
#endif
#ifndef BOOST_NO_TYPENAME_WITH_CTOR
# define BOOST_CTOR_TYPENAME typename
#else
# define BOOST_CTOR_TYPENAME
#endif
// long long workaround ------------------------------------------//
// On gcc (and maybe other compilers?) long long is alway supported
// but it's use may generate either warnings (with -ansi), or errors

View File

@ -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 Sat Sep 20 09:49:52 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_MEMBER_TEMPLATE_KEYWORD" :
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_TWO_PHASE_NAME_LOOKUP" :
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 ] ;

View File

@ -12,6 +12,13 @@
namespace boost_no_is_abstract{
#if defined(__CODEGEARC__)
template<class T>
struct is_abstract_test
{
enum{ value = __is_abstract(T) };
};
#else
template<class T>
struct is_abstract_test
{
@ -32,6 +39,7 @@ struct is_abstract_test
enum{ value = (s1 == sizeof(char)) };
};
#endif
struct non_abstract{};
struct abstract{ virtual void foo() = 0; };
@ -43,10 +51,3 @@ int test()
}

View File

@ -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;
}
}

View File

@ -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 <typename T>
struct B {
typedef T type;
};
template <typename T>
typename T::type f() {
return typename T::type();
}
int test() {
A a = f<B<A> >();
return 0;
}
}

View File

@ -982,6 +982,7 @@ void print_boost_macros()
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 @@ void print_boost_macros()
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);
@ -1034,6 +1036,8 @@ void print_boost_macros()

View File

@ -1,4 +1,4 @@
// This file was automatically generated on Mon Aug 25 10:51:52 2008
// This file was automatically generated on Sat Sep 20 09:49:52 2008
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
@ -187,6 +187,11 @@ namespace boost_no_member_template_keyword = empty_boost;
#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 @@ namespace boost_no_two_phase_name_lookup = empty_boost;
#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 @@ int main( int, char *[] )
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 @@ int main( int, char *[] )
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;

View File

@ -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 <boost/config.hpp>
#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();
}

View File

@ -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 <boost/config.hpp>
#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();
}

View File

@ -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 <boost/config.hpp>
#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();
}

View File

@ -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 <boost/config.hpp>
#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();
}