2 // Copyright 2005-2011 Daniel James.
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // Note: if you change this include guard, you also need to change
7 // container_fwd_compile_fail.cpp
8 #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
9 #define BOOST_DETAIL_CONTAINER_FWD_HPP
11 #if defined(_MSC_VER) && (_MSC_VER >= 1020) && \
12 !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
16 #include <boost/config.hpp>
17 #include <boost/detail/workaround.hpp>
19 ////////////////////////////////////////////////////////////////////////////////
21 // Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
22 // forward declare standard containers. //
24 // BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
25 // normally doesn't. //
27 // BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
29 ////////////////////////////////////////////////////////////////////////////////
31 #if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
32 # if defined(BOOST_DETAIL_CONTAINER_FWD)
33 // Force forward declarations.
34 # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
36 # define BOOST_DETAIL_NO_CONTAINER_FWD
37 # elif defined(__LIBCOMO__)
39 # define BOOST_DETAIL_NO_CONTAINER_FWD
40 # elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
41 // Rogue Wave library:
42 # define BOOST_DETAIL_NO_CONTAINER_FWD
43 # elif defined(_LIBCPP_VERSION)
45 # define BOOST_DETAIL_NO_CONTAINER_FWD
46 # elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
49 // Disable forwarding for all recent versions, as the library has a
50 // versioned namespace mode, and I don't know how to detect it.
51 # if __GLIBCXX__ >= 20070513 \
52 || defined(_GLIBCXX_DEBUG) \
53 || defined(_GLIBCXX_PARALLEL) \
54 || defined(_GLIBCXX_PROFILE)
55 # define BOOST_DETAIL_NO_CONTAINER_FWD
57 # if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530
58 # define BOOST_CONTAINER_FWD_COMPLEX_STRUCT
61 # elif defined(__STL_CONFIG_H)
64 // Forward declaration seems to be okay, but it has a couple of odd
66 # define BOOST_CONTAINER_FWD_BAD_BITSET
67 # if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
68 # define BOOST_CONTAINER_FWD_BAD_DEQUE
70 # elif defined(__MSL_CPP__)
72 # define BOOST_DETAIL_NO_CONTAINER_FWD
73 # elif defined(__IBMCPP__)
74 // The default VACPP std lib, forward declaration seems to be fine.
75 # elif defined(MSIPL_COMPILE_H)
76 // Modena C++ standard library
77 # define BOOST_DETAIL_NO_CONTAINER_FWD
78 # elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
79 // Dinkumware Library (this has to appear after any possible replacement
82 # define BOOST_DETAIL_NO_CONTAINER_FWD
86 #if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
88 #if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
89 !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
104 #if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
108 #if defined(BOOST_CONTAINER_FWD_BAD_BITSET)
112 #if defined(BOOST_MSVC)
113 #pragma warning(push)
114 #pragma warning(disable:4099) // struct/class mismatch in fwd declarations
119 template <class T> class allocator;
120 template <class charT, class traits, class Allocator> class basic_string;
122 #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
124 template <class charT> struct string_char_traits;
126 template <class charT> struct char_traits;
129 #if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT)
130 template <class T> struct complex;
132 template <class T> class complex;
135 #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
136 template <class T, class Allocator> class deque;
139 template <class T, class Allocator> class list;
140 template <class T, class Allocator> class vector;
141 template <class Key, class T, class Compare, class Allocator> class map;
142 template <class Key, class T, class Compare, class Allocator>
144 template <class Key, class Compare, class Allocator> class set;
145 template <class Key, class Compare, class Allocator> class multiset;
147 #if !defined(BOOST_CONTAINER_FWD_BAD_BITSET)
148 template <size_t N> class bitset;
150 template <class T1, class T2> struct pair;
153 #if defined(BOOST_MSVC)
157 #endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
158 // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
160 #endif // BOOST_DETAIL_TEST_CONFIG_ONLY