1 | // (C) Copyright John Maddock 2001 - 2003.
|
---|
2 | // (C) Copyright Darin Adler 2001 - 2002.
|
---|
3 | // (C) Copyright Jens Maurer 2001 - 2002.
|
---|
4 | // (C) Copyright Beman Dawes 2001 - 2003.
|
---|
5 | // (C) Copyright Douglas Gregor 2002.
|
---|
6 | // (C) Copyright David Abrahams 2002 - 2003.
|
---|
7 | // (C) Copyright Synge Todo 2003.
|
---|
8 | // Use, modification and distribution are subject to the
|
---|
9 | // Boost Software License, Version 1.0. (See accompanying file
|
---|
10 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
11 |
|
---|
12 | // See http://www.boost.org for most recent version.
|
---|
13 |
|
---|
14 | // GNU C++ compiler setup:
|
---|
15 |
|
---|
16 | #if __GNUC__ < 3
|
---|
17 | # if __GNUC_MINOR__ == 91
|
---|
18 | // egcs 1.1 won't parse shared_ptr.hpp without this:
|
---|
19 | # define BOOST_NO_AUTO_PTR
|
---|
20 | # endif
|
---|
21 | # if __GNUC_MINOR__ < 95
|
---|
22 | //
|
---|
23 | // Prior to gcc 2.95 member templates only partly
|
---|
24 | // work - define BOOST_MSVC6_MEMBER_TEMPLATES
|
---|
25 | // instead since inline member templates mostly work.
|
---|
26 | //
|
---|
27 | # define BOOST_NO_MEMBER_TEMPLATES
|
---|
28 | # if __GNUC_MINOR__ >= 9
|
---|
29 | # define BOOST_MSVC6_MEMBER_TEMPLATES
|
---|
30 | # endif
|
---|
31 | # endif
|
---|
32 |
|
---|
33 | # if __GNUC_MINOR__ < 96
|
---|
34 | # define BOOST_NO_SFINAE
|
---|
35 | # endif
|
---|
36 |
|
---|
37 | # if __GNUC_MINOR__ <= 97
|
---|
38 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
---|
39 | # define BOOST_NO_OPERATORS_IN_NAMESPACE
|
---|
40 | # endif
|
---|
41 |
|
---|
42 | # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
---|
43 | # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
---|
44 | # define BOOST_NO_IS_ABSTRACT
|
---|
45 | #elif __GNUC__ == 3
|
---|
46 | # if defined (__PATHSCALE__)
|
---|
47 | # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
---|
48 | # define BOOST_NO_IS_ABSTRACT
|
---|
49 | # endif
|
---|
50 | //
|
---|
51 | // gcc-3.x problems:
|
---|
52 | //
|
---|
53 | // Bug specific to gcc 3.1 and 3.2:
|
---|
54 | //
|
---|
55 | # if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))
|
---|
56 | # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
---|
57 | # endif
|
---|
58 | # if __GNUC_MINOR__ < 4
|
---|
59 | # define BOOST_NO_IS_ABSTRACT
|
---|
60 | # endif
|
---|
61 | #endif
|
---|
62 | #if __GNUC__ < 4
|
---|
63 | //
|
---|
64 | // All problems to gcc-3.x and earlier here:
|
---|
65 | //
|
---|
66 | #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
---|
67 | #endif
|
---|
68 |
|
---|
69 | #ifndef __EXCEPTIONS
|
---|
70 | # define BOOST_NO_EXCEPTIONS
|
---|
71 | #endif
|
---|
72 |
|
---|
73 |
|
---|
74 | //
|
---|
75 | // Threading support: Turn this on unconditionally here (except for
|
---|
76 | // those platforms where we can know for sure). It will get turned off again
|
---|
77 | // later if no threading API is detected.
|
---|
78 | //
|
---|
79 | #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
---|
80 | # define BOOST_HAS_THREADS
|
---|
81 | #endif
|
---|
82 |
|
---|
83 | //
|
---|
84 | // gcc has "long long"
|
---|
85 | //
|
---|
86 | #define BOOST_HAS_LONG_LONG
|
---|
87 |
|
---|
88 | //
|
---|
89 | // gcc implements the named return value optimization since version 3.1
|
---|
90 | //
|
---|
91 | #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
|
---|
92 | #define BOOST_HAS_NRVO
|
---|
93 | #endif
|
---|
94 | //
|
---|
95 | // RTTI and typeinfo detection is possible post gcc-4.3:
|
---|
96 | //
|
---|
97 | #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
|
---|
98 | # ifndef __GXX_RTTI
|
---|
99 | # define BOOST_NO_TYPEID
|
---|
100 | # define BOOST_NO_RTTI
|
---|
101 | # endif
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | //
|
---|
105 | // C++0x features
|
---|
106 | //
|
---|
107 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)
|
---|
108 | // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
|
---|
109 | // passed on the command line, which in turn defines
|
---|
110 | // __GXX_EXPERIMENTAL_CXX0X__.
|
---|
111 | # if defined(__GXX_EXPERIMENTAL_CXX0X__)
|
---|
112 | # define BOOST_HAS_STATIC_ASSERT
|
---|
113 | # define BOOST_HAS_VARIADIC_TMPL
|
---|
114 | # define BOOST_HAS_RVALUE_REFS
|
---|
115 | # define BOOST_HAS_DECLTYPE
|
---|
116 | # endif
|
---|
117 | #endif
|
---|
118 |
|
---|
119 | //
|
---|
120 | // Potential C++0x features
|
---|
121 | //
|
---|
122 |
|
---|
123 | // Variadic templates compiler:
|
---|
124 | // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
|
---|
125 | #ifdef __VARIADIC_TEMPLATES
|
---|
126 | # define BOOST_HAS_VARIADIC_TMPL
|
---|
127 | #endif
|
---|
128 |
|
---|
129 | // ConceptGCC compiler:
|
---|
130 | // http://www.generic-programming.org/software/ConceptGCC/
|
---|
131 | #ifdef __GXX_CONCEPTS__
|
---|
132 | # define BOOST_HAS_CONCEPTS
|
---|
133 | # define BOOST_COMPILER "ConceptGCC version " __VERSION__
|
---|
134 | #endif
|
---|
135 |
|
---|
136 | #ifndef BOOST_COMPILER
|
---|
137 | # define BOOST_COMPILER "GNU C++ version " __VERSION__
|
---|
138 | #endif
|
---|
139 |
|
---|
140 | //
|
---|
141 | // versions check:
|
---|
142 | // we don't know gcc prior to version 2.90:
|
---|
143 | #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
|
---|
144 | # error "Compiler not configured - please reconfigure"
|
---|
145 | #endif
|
---|
146 | //
|
---|
147 | // last known and checked version is 4.3 (Pre-release):
|
---|
148 | #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 3))
|
---|
149 | # if defined(BOOST_ASSERT_CONFIG)
|
---|
150 | # error "Unknown compiler version - please run the configure tests and report the results"
|
---|
151 | # else
|
---|
152 | // we don't emit warnings here anymore since there are no defect macros defined for
|
---|
153 | // gcc post 3.4, so any failures are gcc regressions...
|
---|
154 | //# warning "Unknown compiler version - please run the configure tests and report the results"
|
---|
155 | # endif
|
---|
156 | #endif
|
---|
157 |
|
---|
158 |
|
---|