Compare commits

...

47 Commits

Author SHA1 Message Date
nobody
deed43a6a8 This commit was manufactured by cvs2svn to create tag
'Version_1_24_0'.

[SVN r10904]
2001-08-20 14:01:13 +00:00
Beman Dawes
34c0eb63bf Misc; mostly fix links to hard disk locations
[SVN r10902]
2001-08-20 13:04:43 +00:00
Dave Abrahams
4ac695b81f updated for CWPro7 compatibility
[SVN r10882]
2001-08-17 02:25:10 +00:00
Jens Maurer
313d8ce2fc added MIPS (big endian)
[SVN r10835]
2001-08-10 16:07:04 +00:00
Darin Adler
64c32bf98f Spell things consistently. Add some bits of Mac stuff to the tests.
Use std::size_t where needed.


[SVN r10800]
2001-08-07 17:22:02 +00:00
Dave Abrahams
24ad6f217b Added fix due to kensai@pacbell.net
[SVN r10708]
2001-07-27 11:36:53 +00:00
Beman Dawes
e37ec5a95e Add Comeau under Win32
[SVN r10680]
2001-07-20 21:15:54 +00:00
Beman Dawes
e3e23aa159 Add Comeau defines
[SVN r10678]
2001-07-20 20:27:41 +00:00
Beman Dawes
79f2762aa2 Add || defined(__ppc__) (Fabrice Truillot)
[SVN r10633]
2001-07-16 16:57:05 +00:00
Beman Dawes
00c899540f #include <cwchar> for WCHAR_MIN and WCHAR_MAX (Daryle Walker)
[SVN r10567]
2001-07-08 17:36:15 +00:00
Beman Dawes
cc064675a6 1.23.0 runup
[SVN r10559]
2001-07-06 19:59:28 +00:00
Douglas Gregor
417ec50c39 config.hpp:
- Removed BOOST_NO_DEPENDENT_BASE_LOOKUP
	- Removed BOOST_WEAK_CONVERSION_OPERATORS


[SVN r10489]
2001-06-30 18:33:57 +00:00
Douglas Gregor
caef31de2a config.hpp:
- Comeau 4.2.45.2 does not correctly handle function pointers to
	  to functions with default arguments. Use virtual function
	  implementation for Boost.Function.


[SVN r10432]
2001-06-26 13:40:36 +00:00
Jens Maurer
c1222123b3 Intel C++ doesn't have argument dependent lookup even in strict mode, even
with EDG 2.45 frontend.


[SVN r10426]
2001-06-25 19:55:30 +00:00
Jens Maurer
99f61828d5 SunCC and MIPSpro/STLport don't have a conforming std::allocator
(rebind is missing).
Factor BOOST_NO_DEPENDENT_BASE_LOOKUP in generic EDG 2.38 section.


[SVN r10412]
2001-06-24 16:16:04 +00:00
John Maddock
1e3a4a1e54 Added Metroworks fixes submitted by Daryle Walker
[SVN r10409]
2001-06-23 11:42:42 +00:00
Jens Maurer
24a6f03ce7 add Douglas Gregor's name to previous fix
[SVN r10408]
2001-06-23 08:29:18 +00:00
Jens Maurer
61125a8339 using "rebind" with MSVC doesn't work
[SVN r10407]
2001-06-23 08:27:53 +00:00
Beman Dawes
d471920ae8 Boost.function changes plus re-order compilers by vendor name
[SVN r10366]
2001-06-21 15:51:32 +00:00
Jens Maurer
ea50a67139 beautify #if for gcc 3.0
[SVN r10353]
2001-06-17 17:57:07 +00:00
Beman Dawes
3c211cf52a Dinkumware fix from Mike Thompson
[SVN r10308]
2001-06-11 13:18:06 +00:00
Jens Maurer
fb63ddc2e0 free -> fee
[SVN r10248]
2001-05-31 17:22:20 +00:00
Jens Maurer
b96be9d81c fix typo
[SVN r10247]
2001-05-30 16:35:44 +00:00
John Maddock
cf8041403b Tidied up preprocessor logic for wchar_t specialisation
[SVN r10244]
2001-05-30 11:31:56 +00:00
Jens Maurer
e6858c8534 added BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS (Daryle Walker)
[SVN r10242]
2001-05-29 22:10:11 +00:00
Beman Dawes
8ac22ab75d 1.22.0 runup
[SVN r10228]
2001-05-25 19:37:38 +00:00
Jens Maurer
3e35f9e861 fixed Intel + new Dinkumware again
[SVN r10225]
2001-05-24 21:50:36 +00:00
Beman Dawes
aeee4bea2e add __ICL
[SVN r10217]
2001-05-24 15:42:07 +00:00
Jens Maurer
b700c25f06 minor tweak for Cygnus (thanks to Ross Smith)
[SVN r10212]
2001-05-24 09:20:49 +00:00
Beman Dawes
20439e1aef Update for Metrowerks 6.2 (Chris Little)
[SVN r10194]
2001-05-23 13:35:15 +00:00
Jens Maurer
3987d988e0 refactored tests to account for numeric_limits<>::has_XXX flags
[SVN r10193]
2001-05-22 21:26:45 +00:00
Beman Dawes
11291104a5 Smart pointer and utility changes related to adding checked_delere and checked_array_delete
[SVN r10189]
2001-05-22 18:58:21 +00:00
Jens Maurer
bd702153cb additional fix for Intel C++ with Dinkumware 3.06
[SVN r10157]
2001-05-19 21:05:18 +00:00
Jens Maurer
74a8ab80e5 rework Intel #define's to be library-specific
[SVN r10153]
2001-05-19 09:07:14 +00:00
Jens Maurer
3fe7088cda output __USLC__ macro
[SVN r10152]
2001-05-19 09:06:21 +00:00
Jens Maurer
7e2fb0aa47 Intel C++ on Linux doesn't have the SGI STL interface for hash_map and friends
[SVN r10121]
2001-05-17 20:17:43 +00:00
Jens Maurer
b16b2e09e8 check #define's from Linux edition of Intel C++ 5.0
[SVN r10120]
2001-05-17 20:11:27 +00:00
Jens Maurer
7ac6ca8360 report more predefined symbols
[SVN r10109]
2001-05-13 18:25:07 +00:00
Jens Maurer
f098db79ff add note that HP aCC support is not complete
[SVN r10108]
2001-05-13 18:23:00 +00:00
Jens Maurer
1f933d75a5 don't test "long long" with gcc 3.0's shipped library
[SVN r10094]
2001-05-11 16:55:31 +00:00
Jens Maurer
326ca342c6 HPPA is big-endian
[SVN r10082]
2001-05-09 21:14:35 +00:00
John Maddock
66a206af29 sun 5.1 config fixes - see comments for details
[SVN r10057]
2001-05-08 11:08:12 +00:00
Jens Maurer
f891fd11b5 add Dinkumware 3.06 library for MSVC and Intel C++
[SVN r10050]
2001-05-07 21:20:18 +00:00
Jens Maurer
375235cc35 output __EDG_VERSION__
[SVN r10029]
2001-05-05 20:41:37 +00:00
Jens Maurer
952b926f1e beautify #error message
[SVN r10026]
2001-05-05 20:27:35 +00:00
Jens Maurer
1ad42da3a3 HP aCC compiler workarounds
[SVN r10018]
2001-05-05 19:55:26 +00:00
John Maddock
d880c37ab1 Minor fix for C++ Builder + STLPort
[SVN r9986]
2001-04-27 11:05:11 +00:00
5 changed files with 334 additions and 113 deletions

View File

@@ -1,4 +1,4 @@
// Boost config.hpp configuration test program file ------------------------------//
// Boost config.hpp configuration test program file -----------------------//
// (C) Copyright Boost.org 2000. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
@@ -11,10 +11,14 @@
#include <iostream>
using std::cout;
using std::hex;
using std::dec;
int main()
{
// boost compiler workaround defines
# ifdef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
cout << "BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS defined\n";
# endif
@@ -63,10 +67,49 @@ int main()
cout << "BOOST_SYSTEM_HAS_STDINT_H defined\n";
# endif
// compilers
# ifdef __COMO__
cout << "__COMO__ defined as " << __COMO__ << "\n";
# endif
# ifdef __COMO_VERSION__
cout << "__COMO_VERSION__ defined as " << __COMO_VERSION__ << "\n";
# endif
# ifdef __GNUC__
cout << "__GNUC__ defined as " << __GNUC__ << "\n";
# endif
# ifdef __GNUC_MINOR__
cout << "__GNUC_MINOR__ defined as " << __GNUC_MINOR__ << "\n";
# endif
# ifdef __EDG__
cout << "__EDG__ defined as " << __EDG__ << "\n";
# endif
# ifdef __EDG_VERSION__
cout << "__EDG_VERSION__ defined as " << __EDG_VERSION__ << "\n";
# endif
# ifdef __ICC
cout << "__ICC defined as " << __ICC << "\n";
# endif
# ifdef __ICL
cout << "__ICL defined as " << __ICL << "\n";
# endif
# ifdef __INTEL_COMPILER
cout << "__INTEL_COMPILER defined as " << __INTEL_COMPILER << "\n";
# endif
# ifdef __USLC__
cout << "__USLC__ defined\n";
# endif
# ifdef __BORLANDC__
cout << "__BORLANDC__ defined as " << __BORLANDC__ << "\n";
# endif
@@ -79,6 +122,20 @@ int main()
cout << "__SUNPRO_CC defined as " << __SUNPRO_CC << "\n";
# endif
# ifdef __sgi
cout << "__sgi is defined\n";
# ifdef _COMPILER_VERSION
cout << "_COMPILER_VERSION defined as " << _COMPILER_VERSION << "\n";
# endif
# endif
# ifdef __DECCXX
cout << "__DECCXX defined\n";
# ifdef __DECCXX_VER
cout << "__DECCXX_VER defined as " << __DECCXX_VER << "\n";
# endif
# endif
# ifdef _MSC_VER
cout << "_MSC_VER defined as " << _MSC_VER << "\n";
# endif
@@ -95,8 +152,28 @@ int main()
cout << "BOOST_MSVC_STD_ITERATOR defined\n";
# endif
// libraries
# ifdef __SGI_STL_PORT
cout << "__SGI_STL_PORT defined\n";
cout << "__SGI_STL_PORT defined as 0x"
<< hex << __SGI_STL_PORT << dec << "\n";
# endif
# ifdef __GLIBCPP__
cout << "__GLIBCPP__ defined\n";
# endif
# ifdef _GLIBCPP_VERSION
cout << "_GLIBCPP_VERSION defined as " << _GLIBCPP_VERSION << "\n";
# endif
# ifdef _GLIBCPP_USE_LONG_LONG
cout << "_GLIBCPP_USE_LONG_LONG defined\n";
# endif
# ifdef _GLIBCPP_USE_WCHAR_T
cout << "_GLIBCPP_USE_WCHAR_T defined\n";
# endif
# ifdef __STL_NO_NAMESPACES
@@ -111,5 +188,9 @@ int main()
cout << "__STL_IMPORT_VENDOR_CSTD defined\n";
# endif
# ifdef _RWSTD_VER
cout << "_RWSTD_VER defined as " << _RWSTD_VER << "\n";
# endif
return 0;
}

View File

@@ -11,6 +11,7 @@
// http://www.boost.org/libs/config
// Revision History (excluding minor changes for specific compilers)
// 29 Mar 01 BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS (Daryle Walker)
// 16 Mar 01 Added BOOST_VERSION (Jens Maurer)
// 06 Mar 01 Refactored EDG checks for Intel C++ (Dave Abrahams)
// 04 Mar 01 Factored EDG checks, added BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
@@ -58,7 +59,7 @@
#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP
#define BOOST_VERSION 102102
#define BOOST_VERSION 102400
// BOOST_VERSION % 100 is the sub-minor version
// BOOST_VERSION / 100 % 1000 is the minor version
@@ -73,11 +74,11 @@
// burden where it should be, on non-conforming compilers. In the future,
// hopefully, less rather than more conformance flags will have to be defined.
// BOOST_NO_CV_SPECIALIZATIONS: if template specialisations for cv-qualified types
// conflict with a specialistaion for unqualififed type.
// BOOST_NO_CV_SPECIALIZATIONS: if template specializations for cv-qualified
// types conflict with a specialization for unqualififed type.
// BOOST_NO_CV_VOID_SPECIALIZATIONS: if template specialisations for cv-void types
// conflict with a specialistaion for void.
// BOOST_NO_CV_VOID_SPECIALIZATIONS: if template specializations for cv-void
// types conflict with a specialization for void.
// BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP: Compiler does not implement
// argument-dependent lookup (also named Koenig lookup); see std::3.4.2
@@ -87,6 +88,9 @@
// parameters cannot have a dependent type, for example
// "template<class T, typename T::type value> class X { ... };"
// BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS: Can only use deduced
// template arguments when calling function template instantiations.
// BOOST_NO_INCLASS_MEMBER_INITIALIZATION: Compiler violates std::9.4.2/4.
// BOOST_NO_INT64_T: <boost/cstdint.hpp> does not support 64-bit integer
@@ -144,6 +148,23 @@
// 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<typename T> void f(T); // #1
// template<typename T, typename U> void f(T (*)(U)); // #2
// void bar(int);
// f(&bar); // should choose #2.
// BOOST_NO_DEPENDENT_NESTED_DERIVATIONS: The compiler fails to compile
// a nested class that has a dependent base class:
// template<typename T>
// struct foo : public T {
// template<typename U>
// struct bar : public T, public U {};
// };
//
// Compiler Control or Information Macros ----------------------------------//
//
// Compilers often supply features outside of the C++ Standard which need to be
@@ -218,7 +239,6 @@
// Edison Design Group front-ends
# if defined(__EDG_VERSION__)
# if __EDG_VERSION__ <= 241
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# endif
@@ -226,78 +246,18 @@
# 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 <string> // 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__ == 2 && __GNUC_MINOR__ > 97) || __GNUC__ > 2
// upcoming gcc 3.0
# include <iterator>
# if defined(__GLIBCPP__)
// The new GNU C++ library has slist, hash_map, hash_set headers
// in <ext/*>, but client code assumes they're in <*> --- Jens M.
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# endif
# 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 <cwchar> 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 <memory>
# if __BORLANDC__ <= 0x0551
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_PRIVATE_IN_AGGREGATE
# endif
@@ -329,14 +289,105 @@
# define BOOST_NO_CV_SPECIALIZATIONS
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
// Intel -------------------------------------------------------------------//
// Comeau C++ ----------------------------------------------------------------//
# elif defined __COMO__
# if __COMO_VERSION__ <= 4245
# define BOOST_FUNCTION_USE_VIRTUAL_FUNCTIONS
# if defined(_MSC_VER) && _MSC_VER <= 1200
# define BOOST_NO_STDC_NAMESPACE
# endif
# 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 <string> // 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 <iterator>
# if defined(__GLIBCPP__)
// The new GNU C++ library has slist, hash_map, hash_set headers
// in <ext/*>, 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 <iterator>
# 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
// Intel C++ 5.0.1 uses EDG 2.45, but fails to activate Koenig lookup
// in the frontend even in "strict" mode. (reported by Kirk Klobe)
# ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# endif
# 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 <iterator> // 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
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# elif defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
# // full dinkumware 3.06 and above
# define BOOST_NO_HASH
# define BOOST_NO_STD_ITERATOR_TRAITS
# if !_GLOBAL_USING // can be defined in yvals.h
# define BOOST_NO_STDC_NAMESPACE
# endif
# else // assume using dinkumware's STL that comes with VC++ 6.0
# define BOOST_MSVC_STD_ITERATOR
# define BOOST_NO_STD_ITERATOR_TRAITS
@@ -347,17 +398,34 @@
# 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)
// Metrowerks CodeWarrior --------------------------------------------------//
// Kai C++ ----------------------------------------------------------------
#elif defined __KCC
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# if __KCC_VERSION <= 4001
// at least on Sun, the contents of <cwchar> is not in namespace std
# define BOOST_NO_STDC_NAMESPACE
# endif
// Metrowerks CodeWarrior -------------------------------------------------//
# elif defined __MWERKS__
# if __MWERKS__ <= 0x2400 // 6.0
# if __MWERKS__ <= 0x2402 // 7
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# endif
# if __MWERKS__ <= 0x2301 // 5.3?
# if __MWERKS__ <= 0x2401 // 6.2
# define BOOST_WEAK_FUNCTION_TEMPLATE_ORDERING
# endif
# if __MWERKS__ <= 0x2301 // 5.3
# define BOOST_NO_POINTER_TO_MEMBER_CONST
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_HASH
# endif
# if __MWERKS__ >= 0x2400
# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
# endif
# if __MWERKS__ >= 0x2300
# define BOOST_SYSTEM_HAS_STDINT_H
@@ -373,22 +441,43 @@
# define BOOST_DECL
# endif
# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
// SGI MIPSpro C++ ---------------------------------------------------------//
// Sun Workshop Compiler C++ ------------------------------------------------//
# elif defined __sgi
// This is a generic STLport condition and could be moved elsewhere.
# include <iterator>
# if defined(__SGI_STL_PORT) && !defined(__STL_MEMBER_TEMPLATE_CLASSES) && !defined(_STLP_MEMBER_TEMPLATE_CLASSES)
# define BOOST_NO_STD_ALLOCATOR
# endif
// Sun Workshop Compiler C++ -----------------------------------------------//
# elif defined __SUNPRO_CC
# if __SUNPRO_CC <= 0x520
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# define BOOST_NO_STD_ITERATOR_TRAITS
# define BOOST_NO_STD_ALLOCATOR
// although sunpro 5.1 supports the syntax for
// inline initialization it often gets the value
// wrong, especially where the value is computed
// from other constants (J Maddock 6th May 2001)
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// although sunpro 5.1 supports the syntax for
// partial specialization, it often seems to
// bind to the wrong specialization. Better
// to disable it until suppport becomes more stable
// (J Maddock 6th May 2001).
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif
# if __SUNPRO_CC <= 0x500
# define BOOST_NO_MEMBER_TEMPLATES
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif
// Microsoft Visual C++ (excluding Intel/EDG front end) --------------------//
// Microsoft Visual C++ (excluding Intel/EDG front end) --------------------
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
@@ -404,6 +493,7 @@
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
# define BOOST_NO_PRIVATE_IN_AGGREGATE
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
# define BOOST_NO_INTEGRAL_INT64_T
# define BOOST_NO_INTRINSIC_WCHAR_T
@@ -417,14 +507,27 @@
# 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 <iterator> // 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
// A conforming allocator is supplied, but the compiler cannot cope
// when using "rebind". (Douglas Gregor)
# define BOOST_NO_STD_ALLOCATOR
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# elif defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
// full dinkumware 3.06 and above
# define BOOST_NO_HASH
# define BOOST_NO_STD_ITERATOR_TRAITS
# ifndef _GLOBAL_USING // can be defined in yvals.h
# define BOOST_NO_STDC_NAMESPACE
# endif
# if _CPPLIB_VER < 308 // fix due to kensai@pacbell.net
# define BOOST_MSVC_STD_ITERATOR
# endif
# else
# define BOOST_MSVC_STD_ITERATOR 1
# define BOOST_MSVC_STD_ITERATOR
# define BOOST_NO_SLIST
# define BOOST_NO_HASH
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
@@ -477,7 +580,7 @@
// end of compiler specific portion ----------------------------------------//
#if defined(BOOST_NO_LIMITS) || (defined(_RWSTD_VER) && defined(__BORLANDC__) && _RWSTD_VER < 0x020300) || (defined(__SGI_STL_PORT) && __SGI_STL_PORT <= 0x410 && __STL_STATIC_CONST_INIT_BUG)
#if defined(BOOST_NO_LIMITS) || (defined(_RWSTD_VER) && defined(__BORLANDC__) && _RWSTD_VER < 0x020300) || (defined(__SGI_STL_PORT) && __SGI_STL_PORT <= 0x410 && defined(__STL_STATIC_CONST_INIT_BUG))
// STLPort 4.0 doesn't define the static constants in numeric_limits<> so that they
// can be used at compile time if the compiler bug indicated by
// __STL_STATIC_CONST_INIT_BUG is present.
@@ -488,6 +591,11 @@
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#endif
#if defined(__hpux)
// HP-UX has a nice stdint.h in a different location, see boost/cstdint.hpp
# define BOOST_SYSTEM_HAS_STDINT_H
#endif
#ifndef BOOST_STD_EXTENSION_NAMESPACE
# define BOOST_STD_EXTENSION_NAMESPACE std
#endif
@@ -550,3 +658,7 @@ namespace std {

View File

@@ -20,6 +20,8 @@
/*
* Revision history:
* 10 Aug 2001:
* Added MIPS (big endian) to the big endian family. (Jens Maurer)
* 13 Apr 2001:
* Added powerpc to the big endian family. (Jeremy Siek)
* 5 Apr 2001:
@@ -33,12 +35,15 @@
#include <climits>
#include <cfloat>
#include <cwchar> // for WCHAR_MIN and WCHAR_MAX
#include <boost/config.hpp>
#if defined(__sparc) || defined(__sparc__) || defined(__powerpc__)
#if defined(__sparc) || defined(__sparc__) || defined(__powerpc__) || defined(__ppc__) || defined(__hppa) || defined(_MIPSEB)
#define BOOST_BIG_ENDIAN
#elif !defined(__i386__)
#error This file is not correctly set up for your cpu type.
#elif defined(__i386__)
#define BOOST_LITTLE_ENDIAN
#else
#error The file boost/detail/limits.hpp needs to be set up for your CPU type.
#endif
namespace std {
@@ -268,16 +273,26 @@ class numeric_limits<unsigned char>
: public _Integer_limits<unsigned char, 0, UCHAR_MAX>
{};
#ifndef _WIN32
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
#if !defined(WCHAR_MAX) || !defined(WCHAR_MIN)
#if !defined(_WIN32) && !defined(__CYGWIN__)
template<>
class numeric_limits<wchar_t>
: public _Integer_limits<wchar_t, INT_MIN, INT_MAX>
{};
#else
template<>
class numeric_limits<wchar_t>
: public _Integer_limits<wchar_t, 0, USHRT_MAX>
{};
#endif
#else
template<>
class numeric_limits<wchar_t>
: public _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX>
{};
#endif
#endif
template<>
class numeric_limits<short>

View File

@@ -79,8 +79,10 @@ be self documenting.</p>
<h2>Test program</h2>
<p>The <a href="config_test.cpp">config_test.cpp</a> program can be used to
verify which #defines are in effect for your compiler.</p>
<p>The <a href="limits_test.cpp">limits_test.cpp</a> program can also be helpful
in diagnosing configuration problems.</p>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->10 Nov 2000<!--webbot bot="Timestamp" endspan i-checksum="15233" --></p>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->22 May 2001<!--webbot bot="Timestamp" endspan i-checksum="15106" --></p>
</body>

View File

@@ -2,7 +2,7 @@
*
* Copyright Jens Maurer 2000
* Permission to use, copy, modify, sell, and distribute this software
* is hereby granted without free provided that the above copyright notice
* is hereby granted without fee provided that the above copyright notice
* appears in all copies and that both that copyright notice and this
* permission notice appear in supporting documentation,
*
@@ -66,18 +66,10 @@ void test_float_limits(const T &, const char * msg)
BOOST_TEST(!lim::is_integer);
BOOST_TEST(lim::is_signed);
BOOST_TEST(lim::epsilon() > 0);
BOOST_TEST(lim::has_infinity);
BOOST_TEST(lim::has_quiet_NaN);
BOOST_TEST(lim::has_signaling_NaN);
const T infinity = lim::infinity();
const T qnan = lim::quiet_NaN();
const T snan = lim::signaling_NaN();
// make sure those values are not 0 or similar nonsense
std::cout << "IEEE-compatible: " << lim::is_iec559
<< ", traps: " << lim::traps
<< ", bounded: " << lim::is_bounded
@@ -89,25 +81,44 @@ void test_float_limits(const T &, const char * msg)
print_hex_val(qnan, "qnan");
print_hex_val(snan, "snan");
// infinity is beyond the representable range
BOOST_TEST(lim::max() > 1000);
BOOST_TEST(lim::infinity() > lim::max());
BOOST_TEST(-lim::infinity() < -lim::max());
BOOST_TEST(lim::min() < 0.001);
BOOST_TEST(lim::min() > 0);
BOOST_TEST(lim::min() < 0.001);
BOOST_TEST(lim::epsilon() > 0);
// NaNs shall always compare "false" when compared for equality
// If one of these fail, your compiler may be optimizing incorrectly
BOOST_TEST(! (qnan == 42));
BOOST_TEST(! (qnan == qnan));
BOOST_TEST(qnan != 42);
BOOST_TEST(qnan != qnan);
if(lim::is_iec559) {
BOOST_TEST(lim::has_infinity);
BOOST_TEST(lim::has_quiet_NaN);
BOOST_TEST(lim::has_signaling_NaN);
} else {
std::cout << "Does not claim IEEE conformance" << std::endl;
}
// The following tests may cause arithmetic traps etc. Avoid for now.
// BOOST_TEST(! (qnan < 42));
// BOOST_TEST(! (qnan > 42));
// BOOST_TEST(! (qnan <= 42));
// BOOST_TEST(! (qnan >= 42));
if(lim::has_infinity) {
// make sure those values are not 0 or similar nonsense
// infinity is beyond the representable range
BOOST_TEST(infinity > lim::max());
BOOST_TEST(-infinity < -lim::max());
} else {
std::cout << "Does not have infinity" << std::endl;
}
if(lim::has_quiet_NaN) {
// NaNs shall always compare "false" when compared for equality
// If one of these fail, your compiler may be optimizing incorrectly
BOOST_TEST(! (qnan == 42));
BOOST_TEST(! (qnan == qnan));
BOOST_TEST(qnan != 42);
BOOST_TEST(qnan != qnan);
// The following tests may cause arithmetic traps etc. Avoid for now.
// BOOST_TEST(! (qnan < 42));
// BOOST_TEST(! (qnan > 42));
// BOOST_TEST(! (qnan <= 42));
// BOOST_TEST(! (qnan >= 42));
} else {
std::cout << "Does not have QNaN" << std::endl;
}
}
@@ -129,7 +140,7 @@ int test_main(int, char*[])
test_integral_limits(long(), "long");
typedef unsigned long unsigned_long;
test_integral_limits(unsigned_long(), "unsigned long");
#ifdef __GNUC__
#if defined(__GNUC__) && !(__GNUC__ == 3 && __GNUC_MINOR__ == 0 && defined(__GLIBCPP__))
typedef long long long_long;
test_integral_limits(long_long(), "long long");
typedef unsigned long long unsigned_long_long;