From d471920ae8142497d69102817cac8601b5d1349e Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Thu, 21 Jun 2001 15:51:32 +0000 Subject: [PATCH] Boost.function changes plus re-order compilers by vendor name [SVN r10366] --- include/boost/config.hpp | 209 +++++++++++++++++++++++---------------- 1 file changed, 124 insertions(+), 85 deletions(-) diff --git a/include/boost/config.hpp b/include/boost/config.hpp index e9dfdac3..7e684e53 100644 --- a/include/boost/config.hpp +++ b/include/boost/config.hpp @@ -148,6 +148,29 @@ // BOOST_NO_AUTO_PTR: If the compiler / library supplies non-standard or broken // std::auto_ptr. +// BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING: The compiler does not perform +// function template ordering or its function template ordering is incorrect. +// +// template void f(T); // #1 +// template void f(T (*)(U)); // #2 +// void bar(int); +// f(&bar); // should choose #2. + +// BOOST_NO_DEPENDENT_BASE_LOOKUP: The compiler fails to lookup members +// in dependent base classes properly. + +// BOOST_NO_DEPENDENT_NESTED_DERIVATIONS: The compiler fails to compile +// a nested class that has a dependent base class: +// template +// struct foo : public T { +// template +// struct bar : public T, public U {}; +// }; + +// BOOST_WEAK_CONVERSION_OPERATORS: The compiler fails to consider all +// correct possibilities when applying user-defined conversions. + +// // Compiler Control or Information Macros ----------------------------------// // // Compilers often supply features outside of the C++ Standard which need to be @@ -230,86 +253,20 @@ # endif // Compiler-specific checks -------------------------------------------------// -// Compilers are listed in alphabetic order (except VC++ last - see below)---// - -// GNU CC (also known as GCC and G++) --------------------------------------// - -# if defined __GNUC__ -# if __GNUC__ == 2 && __GNUC_MINOR__ == 91 - // egcs 1.1 won't parse smart_ptr.hpp without this: -# define BOOST_NO_AUTO_PTR -# endif -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 97 -# include // not sure this is the right way to do this -JGS -# if defined(__BASTRING__) && !defined(__GLIBCPP__) && !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS - // this should only detect the stdlibc++ that ships with gcc, and - // not any replacements that may be installed... -# define BOOST_NO_STD_ITERATOR -# define BOOST_NO_LIMITS -# endif -# if !defined(_CXXRT_STD) && !defined(__SGI_STL_OWN_IOSTREAMS) -# define BOOST_NO_STRINGSTREAM -# endif -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# endif -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8 -# define BOOST_NO_MEMBER_TEMPLATES -# endif -# if __GNUC__ >= 3 -# include -# if defined(__GLIBCPP__) - // The new GNU C++ library has slist, hash_map, hash_set headers - // in , but client code assumes they're in <*> --- Jens M. -# define BOOST_NO_SLIST -# define BOOST_NO_HASH -# endif -# endif - -// Intel on Linux --------------------------------------------------------- - -#elif defined __ICC -# include -# ifdef _CPPLIB_VER - // shipped with Dinkumware 3.10, which has a different hash_map -# define BOOST_NO_HASH -# endif - -// Kai C++ ---------------------------------------------------------------- - -#elif defined __KCC -# define BOOST_NO_SLIST -# define BOOST_NO_HASH - -# if __KCC_VERSION <= 4001 - // at least on Sun, the contents of is not in namespace std -# define BOOST_NO_STDC_NAMESPACE -# endif - -// SGI MIPSpro C++ -------------------------------------------------------- - -#elif defined __sgi - -// Compaq Tru64 Unix cxx --------------------------------------------------- - -#elif defined __DECCXX -# define BOOST_NO_SLIST -# define BOOST_NO_HASH - -// Greenhills C++ -----------------------------------------------------------// - -#elif defined __ghs -# define BOOST_NO_SLIST -# define BOOST_NO_HASH +// Compilers are listed in alphabetic order by vendor name +// (except VC++ must be last - see below) // Borland ------------------------------------------------------------------// -#elif defined __BORLANDC__ +#if defined __BORLANDC__ # define BOOST_NO_SLIST # define BOOST_NO_HASH // pull in standard library version: # include # if __BORLANDC__ <= 0x0551 +# define BOOST_NO_DEPENDENT_BASE_LOOKUP +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_WEAK_CONVERSION_OPERATORS # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_PRIVATE_IN_AGGREGATE # endif @@ -341,9 +298,85 @@ # define BOOST_NO_CV_SPECIALIZATIONS # define BOOST_NO_CV_VOID_SPECIALIZATIONS +// Comeau C++ ----------------------------------------------------------------// + +# elif defined __COMO__ +# if __COMO_VERSION__ <= 4244 +# define BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS +# endif + +// Compaq Tru64 Unix cxx --------------------------------------------------- + +# elif defined __DECCXX +# define BOOST_NO_SLIST +# define BOOST_NO_HASH + +// GNU CC (also known as GCC and G++) --------------------------------------// + +# elif defined __GNUC__ +# if __GNUC__ == 2 && __GNUC_MINOR__ == 91 + // egcs 1.1 won't parse smart_ptr.hpp without this: +# define BOOST_NO_AUTO_PTR +# endif +# if __GNUC__ == 2 && __GNUC_MINOR__ <= 97 +# include // not sure this is the right way to do this -JGS +# if defined(__BASTRING__) && !defined(__GLIBCPP__) && !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS + // this should only detect the stdlibc++ that ships with gcc, and + // not any replacements that may be installed... +# define BOOST_NO_STD_ITERATOR +# define BOOST_NO_LIMITS +# endif +# if !defined(_CXXRT_STD) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STRINGSTREAM +# endif +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_OPERATORS_IN_NAMESPACE +# define BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING +# endif +# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8 +# define BOOST_NO_MEMBER_TEMPLATES +# endif +# if __GNUC__ >= 3 +# include +# if defined(__GLIBCPP__) + // The new GNU C++ library has slist, hash_map, hash_set headers + // in , but client code assumes they're in <*> --- Jens M. +# define BOOST_NO_SLIST +# define BOOST_NO_HASH +# endif +# endif + +// Greenhills C++ -----------------------------------------------------------// + +#elif defined __ghs +# define BOOST_NO_SLIST +# define BOOST_NO_HASH + +// HP aCC ------------------------------------------------------------------- + +# elif defined __HP_aCC +# define BOOST_NO_SLIST +# define BOOST_NO_HASH +# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +# define BOOST_NO_OPERATORS_IN_NAMESPACE + // (support for HP aCC is not complete, see the regression test results) + +// Intel on Linux -----------------------------------------------------------// + +#elif defined __ICC +# include +# ifdef _CPPLIB_VER + // shipped with Dinkumware 3.10, which has a different hash_map +# define BOOST_NO_HASH +# endif + // Intel on Windows --------------------------------------------------------// # elif defined __ICL +# if __ICL <= 500 +# define BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING +# define BOOST_NO_INTRINSIC_WCHAR_T // tentative addition - required for VC6 compatibility? (added by JM 19 Feb 2001) +# endif # include // not sure this is the right way to do this -JGS # if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES) // a perfectly good implementation of std::iterator is supplied @@ -366,13 +399,24 @@ # define BOOST_NO_STD_ALLOCATOR # define BOOST_NO_STD_MIN_MAX # endif -# define BOOST_NO_INTRINSIC_WCHAR_T // tentative addition - required for VC6 compatibility? (added by JM 19 Feb 2001) +// Kai C++ ---------------------------------------------------------------- + +#elif defined __KCC +# define BOOST_NO_SLIST +# define BOOST_NO_HASH + +# if __KCC_VERSION <= 4001 + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + // Metrowerks CodeWarrior --------------------------------------------------// # elif defined __MWERKS__ # if __MWERKS__ <= 0x2401 // 6.2 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING # endif # if __MWERKS__ <= 0x2301 // 5.3 # define BOOST_NO_POINTER_TO_MEMBER_CONST @@ -394,7 +438,12 @@ # define BOOST_STD_EXTENSION_NAMESPACE Metrowerks -// Sun Workshop Compiler C++ ------------------------------------------------ +// SGI MIPSpro C++ ----------------------------------------------------------// + +#elif defined __sgi +# define BOOST_NO_DEPENDENT_BASE_LOOKUP + +// Sun Workshop Compiler C++ ------------------------------------------------// # elif defined __SUNPRO_CC # if __SUNPRO_CC <= 0x520 @@ -418,16 +467,6 @@ # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif - -// HP aCC ------------------------------------------------------------------- - -# elif defined __HP_aCC -# define BOOST_NO_SLIST -# define BOOST_NO_HASH -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_OPERATORS_IN_NAMESPACE - // (support for HP aCC is not complete, see the regression test results) - // Microsoft Visual C++ (excluding Intel/EDG front end) -------------------- // // Must remain the last #elif since some other vendors (Metrowerks, for @@ -458,7 +497,7 @@ # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS - +# define BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING # include // not sure this is the right way to do this -JGS # if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES) // a perfectly good implementation of std::iterator is supplied