From 1036984586fdca215ca5963fe9bc2f2a8b18f12c Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 9 Sep 2000 10:20:25 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'boost-graph-library'. [SVN r7698] --- config_test.cpp | 10 ++--- include/boost/config.hpp | 34 +++++++++++----- index.htm | 87 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 14 deletions(-) create mode 100644 index.htm diff --git a/config_test.cpp b/config_test.cpp index bf252c7e..d45bd748 100644 --- a/config_test.cpp +++ b/config_test.cpp @@ -7,7 +7,7 @@ // See http://www.boost.org for the most recent version. -#include +#include #include using std::cout; @@ -23,10 +23,6 @@ int main() cout << "BOOST_NO_INCLASS_MEMBER_INITIALIZER defined\n"; # endif -# ifdef BOOST_NO_ITERATOR_TRAITS - cout << "BOOST_NO_ITERATOR_TRAITS defined\n"; -# endif - # ifdef BOOST_NO_MEMBER_TEMPLATES cout << "BOOST_NO_MEMBER_TEMPLATES defined\n"; # endif @@ -43,6 +39,10 @@ int main() cout << "BOOST_NO_STD_ITERATOR defined\n"; # endif +# ifdef BOOST_NO_STD_ITERATOR_TRAITS + cout << "BOOST_NO_STD_ITERATOR_TRAITS defined\n"; +# endif + # ifdef BOOST_NO_STDC_NAMESPACE cout << "BOOST_NO_STDC_NAMESPACE defined\n"; # endif diff --git a/include/boost/config.hpp b/include/boost/config.hpp index b0edc228..dd800d0c 100644 --- a/include/boost/config.hpp +++ b/include/boost/config.hpp @@ -11,8 +11,12 @@ // http://www.boost.org/libs/config // Revision History (excluding minor changes for specific compilers) +// 1 Sep 00 BOOST_NO_PRIVATE_IN_AGGREGATE added. (Mark Rodgers) +// 23 Jul 00 Fixed spelling of BOOST_NO_INCLASS_MEMBER_INITIALIZATION in +// comment (Dave Abrahams). +// 10 Jul 00 BOOST_NO_POINTER_TO_MEMBER_CONST added (Mark Rodgers) // 26 Jun 00 BOOST_NO_STD_ITERATOR, BOOST_MSVC_STD_ITERATOR, -// BOOST_NO_ITERATOR_TRAITS, BOOST_NO_USING_TEMPLATE, +// BOOST_NO_STD_ITERATOR_TRAITS, BOOST_NO_USING_TEMPLATE, // added (Jeremy Siek) // 20 Jun 00 BOOST_MSVC added (Aleksey Gurtovoy) // 14 Jun 00 BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS (Jens M.) @@ -46,11 +50,7 @@ // parameters cannot have a dependent type, for example // "template class X { ... };" -// BOOST_NO_INCLASS_MEMBER_INITIALIZER: Compiler violates std::9.4.2/4. - -// BOOST_NO_ITERATOR_TRAITS: The compiler does not provide a standard -// compliant implementation of std::iterator_traits. Note that -// the compiler may still have a non-standard implementation. +// BOOST_NO_INCLASS_MEMBER_INITIALIZATION: Compiler violates std::9.4.2/4. // BOOST_NO_MEMBER_TEMPLATES: Member template functions not fully supported. // Also see BOOST_MSVC6_MEMBER_TEMPLATES in the Compiler Control section below. @@ -63,9 +63,20 @@ // friend functions to be defined at namespace scope, then using'ed to boost. // Probably GCC specific. See boost/operators.hpp for example. +// BOOST_NO_POINTER_TO_MEMBER_CONST: The compiler does not correctly handle +// pointers to const member functions, preventing use of these in overloaded +// function templates. See boost/functional.hpp for example. + +// BOOST_NO_PRIVATE_IN_AGGREGATE: The compiler misreads 8.5.1, treating classes +// as non-aggregate if they contain private or protected member functions. + // BOOST_NO_STD_ITERATOR: The C++ implementation fails to provide the // std::iterator class. +// BOOST_NO_STD_ITERATOR_TRAITS: The compiler does not provide a standard +// compliant implementation of std::iterator_traits. Note that +// the compiler may still have a non-standard implementation. + // BOOST_NO_STDC_NAMESPACE: The contents of C++ standard headers for C library // functions (the headers) have not been placed in namespace std. // Because the use of std::size_t is so common, a specific workaround for @@ -80,7 +91,9 @@ // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION. Class template partial // specialization (14.5.4 [temp.class.spec]) not supported. -// BOOST_NO_USING_TEMPLATE: This needs some docs! +// BOOST_NO_USING_TEMPLATE: The compiler will not accept a using declaration +// that imports a template from the global namespace into a named namespace. +// Probably Borland specific. // Compiler Control or Information Macros ----------------------------------// // @@ -142,10 +155,11 @@ # if __BORLANDC__ <= 0x0550 // Borland C++ Builder 4 and 5: # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_PRIVATE_IN_AGGREGATE # if __BORLANDC__ == 0x0550 // Borland C++ Builder 5, command-line compiler 5.5: # define BOOST_NO_OPERATORS_IN_NAMESPACE -# define BOOST_NO_USING_TEMPLATE # endif # endif # if defined BOOST_DECL_EXPORTS @@ -177,6 +191,7 @@ # elif defined __MWERKS__ # if __MWERKS__ <= 0x2301 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_POINTER_TO_MEMBER_CONST # endif # if __MWERKS__ >= 0x2300 # define BOOST_SYSTEM_HAS_STDINT_H @@ -204,6 +219,7 @@ # define BOOST_MSVC _MSC_VER # if _MSC_VER <= 1200 // 1200 == VC++ 6.0 # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +# define BOOST_NO_PRIVATE_IN_AGGREGATE // VC++ 6.0 has member templates but they have numerous problems including // cases of silent failure, so for safety we define: @@ -274,7 +290,7 @@ # ifdef BOOST_NO_STDC_NAMESPACE # include namespace std { using ::ptrdiff_t; using ::size_t; } - // using ::wchar_t; removed to work around old compilers (Ed Brey) + // using ::wchar_t; removed since wchar_t is a C++ built-in type (Ed Brey) # endif diff --git a/index.htm b/index.htm new file mode 100644 index 00000000..9a6a422a --- /dev/null +++ b/index.htm @@ -0,0 +1,87 @@ + + + + + + +Configuration Header + + + + + + + + + + + + + +
c++boost.gif (8819 bytes)HomeLibrariesPeopleFAQMore
+

Configuration Header boost/config.hpp

+

The boost/config.hpp header is used to +pass configuration information to other boost files, allowing them to cope with +platform dependencies such as arithmetic byte ordering, compiler pragmas, or +compiler shortcomings. Without such configuration information, many current +compilers would not work with the Boost libraries.

+

Centralizing configuration information is this header reduces the number of +files which must be modified when porting libraries to new platforms, or when +compilers are updated. Ideally, no other files would have to be modified when +porting to a new platform.

+

Configuration headers are controversial because some view them as condoning +broken compilers and encouraging non-standard subsets. Adding settings for +additional platforms and maintaining existing settings can also be a problem. In +other words, configuration headers are a necessary evil rather than a desirable +feature. The boost config.hpp policy is designed to minimize the problems and +maximize the benefits of a configuration header.

+

Boost config.hpp policy

+

For Library Users:

+
    +
  • Boost library users are never required to #include boost/config.hpp, and + are discouraged from including it on their own.
  • +
  • Boost library users can request support for additional platforms be added + to config.hpp by emailing config@boost.org + describing their request.
  • +
+

For Library Implementors:

+
    +
  • Boost library implementors are not required to #include boost/config.hpp, + and are not required in any way to support compilers which do not comply + with the C++ Standard (ISO/IEC 14882).
  • +
  • If a library implementor wishes to support some nonconforming compiler, or + to support some platform specific feature, #include boost/config.hpp is the + preferred way to obtain configuration information not available from the + standard headers such as <climits>, etc.
  • +
  • If configuration information can be deduced from standard headers such as + <climits>, use those standard headers rather than boost/config.hpp.
  • +
  • Boost files that use macros defined in boost/config.hpp should have + sensible, standard conforming, default behavior if the macro is not defined. + This means that the starting point for porting boost/config.hpp to a new + platform is simply to define nothing at all specific to that platform. In + the rare case where there is no sensible default behavior, an #error message + should describe the problem.
  • +
  • If a Boost library implementor wants something added to config.hpp, post a + request on the Boost mailing list. There is no guarantee such a request will + be honored; the intent is to limit the complexity of config.hpp.
  • +
+

General:

+
    +
  • The intent is to support only compilers which appear on their way to + becoming C++ Standard compliant, and only recent releases of those compilers + at that.
  • +
  • The intent is not to disable mainstream features now well-supported by the + majority of compilers, such as namespaces, exceptions, RTTI, or templates.
  • +
+

Documentation

+

See boost/config.hpp; it is designed to +be self documenting.

+

Test program

+

The config_test.cpp program can be used to +verify which #defines are in effect for your compiler.

+
+

Revised 23 Jun 2000

+ + + +