First public contribution.
1 // (C) Copyright John Maddock 2005.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
8 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
11 // IMPORTANT: we must figure out the basics, such as how to
12 // forward to the real std lib headers *without* including
13 // boost/config.hpp or any of the std lib headers. A classic
14 // chicken and the egg problem....
16 // Including <cstddef> at least lets us detect STLport:
20 # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && !defined(__BORLANDC__)
22 // can't use <../stlport/name> since some compilers put stlport in a different directory:
23 # define BOOST_TR1_STD_HEADER(name) <../stlport4/name>
25 # define BOOST_TR1_STD_HEADER(name) <../stlport/name>
27 # elif defined(__HP_aCC)
28 # define BOOST_TR1_STD_HEADER(name) <../include_std/name>
29 # elif defined(__DECCXX)
30 # define BOOST_TR1_STD_HEADER(name) <../cxx/name>
31 # elif defined(__BORLANDC__) && __BORLANDC__ >= 0x570
32 # define BOOST_TR1_STD_HEADER(name) <../include/dinkumware/name>
34 # define BOOST_TR1_STD_HEADER(name) <../include/name>
37 #if defined(__GNUC__) && !defined(BOOST_HAS_INCLUDE_NEXT)
38 # define BOOST_HAS_INCLUDE_NEXT
41 // Can't use BOOST_WORKAROUND here, it leads to recursive includes:
42 #if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || (defined(_MSC_VER) && (_MSC_VER < 1310))
43 # define BOOST_TR1_USE_OLD_TUPLE
47 // We may be in the middle of parsing boost/config.hpp
48 // when this header is included, so don't rely on config
49 // stuff in the rest of this header...
51 // Find our actual std lib:
53 #ifdef BOOST_HAS_INCLUDE_NEXT
54 # ifndef BOOST_TR1_NO_RECURSION
55 # define BOOST_TR1_NO_RECURSION
56 # define BOOST_TR1_NO_CONFIG_RECURSION
58 # include_next <utility>
60 # include_next <algorithm>
61 # include_next <iterator>
63 # ifdef BOOST_TR1_NO_CONFIG_RECURSION
64 # undef BOOST_TR1_NO_CONFIG_RECURSION
65 # undef BOOST_TR1_NO_RECURSION
68 # include BOOST_TR1_STD_HEADER(utility)
71 #if defined(__GLIBCXX__) && !defined(BOOST_TR1_PATH)
72 # define BOOST_TR1_PATH(name) tr1/name
74 #if !defined(BOOST_TR1_PATH)
75 # define BOOST_TR1_PATH(name) name
78 #define BOOST_TR1_HEADER(name) <BOOST_TR1_PATH(name)>
81 // turn on support for everything:
82 # define BOOST_HAS_TR1_ARRAY
83 # define BOOST_HAS_TR1_COMPLEX_OVERLOADS
84 # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
85 # define BOOST_HAS_TR1_REFERENCE_WRAPPER
86 # define BOOST_HAS_TR1_RESULT_OF
87 # define BOOST_HAS_TR1_MEM_FN
88 # define BOOST_HAS_TR1_BIND
89 # define BOOST_HAS_TR1_FUNCTION
90 # define BOOST_HAS_TR1_HASH
91 # define BOOST_HAS_TR1_SHARED_PTR
92 # define BOOST_HAS_TR1_RANDOM
93 # define BOOST_HAS_TR1_REGEX
94 # define BOOST_HAS_TR1_TUPLE
95 # define BOOST_HAS_TR1_TYPE_TRAITS
96 # define BOOST_HAS_TR1_UTILITY
97 # define BOOST_HAS_TR1_UNORDERED_MAP
98 # define BOOST_HAS_TR1_UNORDERED_SET
102 #if defined(__MWERKS__) && (__MWERKS__ >= 0x3205)
104 // Very preliminary MWCW support, may not be right:
106 # define BOOST_HAS_TR1_SHARED_PTR
107 # define BOOST_HAS_TR1_REFERENCE_WRAPPER
108 # define BOOST_HAS_TR1_FUNCTION
109 # define BOOST_HAS_TR1_TUPLE
110 # define BOOST_HAS_TR1_RESULT_OF
113 #ifdef BOOST_HAS_GCC_TR1
114 // turn on support for everything in gcc 4.0.x:
115 # define BOOST_HAS_TR1_ARRAY
116 //# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
117 //# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
118 # define BOOST_HAS_TR1_REFERENCE_WRAPPER
119 # define BOOST_HAS_TR1_RESULT_OF
120 # define BOOST_HAS_TR1_MEM_FN
121 # define BOOST_HAS_TR1_BIND
122 # define BOOST_HAS_TR1_FUNCTION
123 # define BOOST_HAS_TR1_HASH
124 # define BOOST_HAS_TR1_SHARED_PTR
125 //# define BOOST_HAS_TR1_RANDOM
126 //# define BOOST_HAS_TR1_REGEX
127 # define BOOST_HAS_TR1_TUPLE
128 # define BOOST_HAS_TR1_TYPE_TRAITS
129 # define BOOST_HAS_TR1_UTILITY
130 # define BOOST_HAS_TR1_UNORDERED_MAP
131 # define BOOST_HAS_TR1_UNORDERED_SET
135 #include <boost/config.hpp>