From 02602b9139e3c365aff07a4120ea22f3fe14e117 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 19 Feb 2013 16:26:06 +0000 Subject: [PATCH] Add new macro BOOST_GCC as per #7841. Refs #7841. [SVN r83008] --- .../boost_config/boost_macro_reference.html | 76 +++++++++++++++++-- doc/html/index.html | 2 +- doc/macro_reference.qbk | 67 ++++++++++++---- include/boost/config/compiler/gcc.hpp | 7 +- 4 files changed, 127 insertions(+), 25 deletions(-) diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 5c39fd61..3240ba59 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -93,7 +93,7 @@

- The compiler exibits certain partial specialisation bug - probably + The compiler exhibits certain partial specialisation bug - probably Borland C++ Builder specific.

@@ -1832,6 +1832,9 @@

The library has a TR1 conforming version of <array>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_ARRAY.

@@ -1884,7 +1887,9 @@

- The library has TR1 conforming reference wrappers in <functional>. + The library has TR1 conforming reference wrappers in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1901,7 +1906,9 @@

- The library has a TR1 conforming result_of template in <functional>. + The library has a TR1 conforming result_of template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1918,7 +1925,9 @@

- The library has a TR1 conforming mem_fn function template in <functional>. + The library has a TR1 conforming mem_fn function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1935,7 +1944,9 @@

- The library has a TR1 conforming bind function template in <functional>. + The library has a TR1 conforming bind function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1952,7 +1963,9 @@

- The library has a TR1 conforming function class template in <functional>. + The library has a TR1 conforming function class template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1969,7 +1982,9 @@

- The library has a TR1 conforming hash function template in <functional>. + The library has a TR1 conforming hash function template in <functional>. This macro is only guaranteed + to be defined after including one of the headers from Boost.TR1. + Further this macro is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL.

@@ -1988,6 +2003,9 @@

The library has a TR1 conforming shared_ptr class template in <memory>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_SMART_PTR.

@@ -2005,6 +2023,9 @@

The library has a TR1 conforming version of <random>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_RANDOM.

@@ -2022,6 +2043,9 @@

The library has a TR1 conforming version of <regex>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_REGEX.

@@ -2039,6 +2063,9 @@

The library has a TR1 conforming version of <tuple>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TUPLE.

@@ -2056,6 +2083,9 @@

The library has a TR1 conforming version of <type_traits>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TYPE_TRAITS.

@@ -2074,6 +2104,9 @@

The library has the TR1 additions to <utility> (tuple interface to std::pair). + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_TUPLE.

@@ -2091,6 +2124,9 @@

The library has a TR1 conforming version of <unordered_map>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_UNORDERED_MAP.

@@ -2108,6 +2144,9 @@

The library has a TR1 conforming version of <unordered_set>. + This macro is only guaranteed to be defined after including one + of the headers from Boost.TR1. Further this macro is now deprecated + in favour of BOOST_NO_CXX11_HDR_UNORDERED_SET.

@@ -3656,6 +3695,29 @@ + +

+ BOOST_GCC +

+ + +

+ <boost/config.hpp> +

+ + +

+ Defined if the compiler is really GCC, as opposed to one of the + many other compilers that also define __GNUC__. + Has the value: __GNUC__ + * 10000 + + __GNUC_MINOR__ + * 100 + + __GNUC_PATCHLEVEL__. +

+ + +

BOOST_INTEL diff --git a/doc/html/index.html b/doc/html/index.html index 7bfddf23..bdf89c1b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -951,7 +951,7 @@ - +

Last revised: January 17, 2013 at 02:10:17 GMT

Last revised: February 19, 2013 at 16:25:18 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 89bd4754..6b424546 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -28,7 +28,7 @@ compiler's conformance with the 2003 standard. [[`BOOST_BCB_PARTIAL_SPECIALIZATION_BUG`][Compiler][ -The compiler exibits certain partial specialisation bug - probably Borland +The compiler exhibits certain partial specialisation bug - probably Borland C++ Builder specific. ]] [[`BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL`][Compiler][ @@ -429,7 +429,9 @@ The standard library lacks a conforming `std::use_facet`, but has a workaround class-version that does the job. This is primarily for the STLport std lib. ]] [[`BOOST_HAS_TR1_ARRAY`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_ARRAY. ]] [[`BOOST_HAS_TR1_COMPLEX_OVERLOADS`][Standard library][ The library has a version of `` that supports passing scalars to the @@ -440,46 +442,74 @@ The library has a version of `` that includes the new inverse trig functions from TR1. ]] [[`BOOST_HAS_TR1_REFERENCE_WRAPPER`][Standard library][ -The library has TR1 conforming reference wrappers in ``. +The library has TR1 conforming reference wrappers in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_RESULT_OF`][Standard library][ -The library has a TR1 conforming result_of template in ``. +The library has a TR1 conforming result_of template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_MEM_FN`][Standard library][ -The library has a TR1 conforming mem_fn function template in ``. +The library has a TR1 conforming mem_fn function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_BIND`][Standard library][ -The library has a TR1 conforming bind function template in ``. +The library has a TR1 conforming bind function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_FUNCTION`][Standard library][ -The library has a TR1 conforming function class template in ``. +The library has a TR1 conforming function class template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_HASH`][Standard library][ -The library has a TR1 conforming hash function template in ``. +The library has a TR1 conforming hash function template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_FUNCTIONAL. ]] [[`BOOST_HAS_TR1_SHARED_PTR`][Standard library][ -The library has a TR1 conforming `shared_ptr` class template in ``. +The library has a TR1 conforming `shared_ptr` class template in ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_SMART_PTR. ]] [[`BOOST_HAS_TR1_RANDOM`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_RANDOM. ]] [[`BOOST_HAS_TR1_REGEX`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_REGEX. ]] [[`BOOST_HAS_TR1_TUPLE`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TUPLE. ]] [[`BOOST_HAS_TR1_TYPE_TRAITS`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TYPE_TRAITS. ]] [[`BOOST_HAS_TR1_UTILITY`][Standard library][ -The library has the TR1 additions to `` (tuple interface to `std::pair`). +The library has the TR1 additions to `` (tuple interface to `std::pair`). This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_TUPLE. ]] [[`BOOST_HAS_TR1_UNORDERED_MAP`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_UNORDERED_MAP. ]] [[`BOOST_HAS_TR1_UNORDERED_SET`][Standard library][ -The library has a TR1 conforming version of ``. +The library has a TR1 conforming version of ``. This macro is only guaranteed +to be defined after including one of the headers from Boost.TR1. Further this macro +is now deprecated in favour of BOOST_NO_CXX11_HDR_UNORDERED_SET. ]] [[`BOOST_HAS_TR1`][Standard library][ Implies all the other `BOOST_HAS_TR1_*` macros should be set. @@ -973,6 +1003,11 @@ Defined to a normalised 9 digit version of _MSC_FULL_VER (which sometimes only h the macro has the form VVMMPPPPP where VV is the major version number, MM is the minor version number, and PPPPP is the compiler build number. ]] +[[`BOOST_GCC`][``][ +Defined if the compiler is really GCC, as opposed to one +of the many other compilers that also define `__GNUC__`. Has the value: +`__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__`. +]] [[`BOOST_INTEL`][``][ Defined if the compiler is an Intel compiler, takes the same value as the compiler version macro. diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index c0ac30af..b3e7b85f 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -11,7 +11,12 @@ // See http://www.boost.org for most recent version. -// GNU C++ compiler setup: +// GNU C++ compiler setup. + +// +// Define BOOST_GCC so we know this is "real" GCC and not some pretender: +// +#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if __GNUC__ < 3 # if __GNUC_MINOR__ == 91