1 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) 5 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 10 11 #if defined(_MSC_VER) && \ 12 !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) 13 # pragma once 14 #endif 15 16 #include <boost/config.hpp> 17 #include <boost/detail/workaround.hpp> 18 19 //////////////////////////////////////////////////////////////////////////////// 20 // // 21 // Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to // 22 // forward declare standard containers. // 23 // // 24 // BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it // 25 // normally doesn't. // 26 // // 27 // BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. // 28 // // 29 //////////////////////////////////////////////////////////////////////////////// 30 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) 35 // STLport 36 # define BOOST_DETAIL_NO_CONTAINER_FWD 37 # elif defined(__LIBCOMO__) 38 // Comeau STL: 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) 44 // libc++ 45 # define BOOST_DETAIL_NO_CONTAINER_FWD 46 # elif defined(__GLIBCPP__) || defined(__GLIBCXX__) 47 // GNU libstdc++ 3 48 // 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 56 # else 57 # if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530 58 # define BOOST_CONTAINER_FWD_COMPLEX_STRUCT 59 # endif 60 # endif 61 # elif defined(__STL_CONFIG_H) 62 // generic SGI STL 63 // 64 // Forward declaration seems to be okay, but it has a couple of odd 65 // implementations. 66 # define BOOST_CONTAINER_FWD_BAD_BITSET 67 # if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) 68 # define BOOST_CONTAINER_FWD_BAD_DEQUE 69 # endif 70 # elif defined(__MSL_CPP__) 71 // MSL standard lib: 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 80 // libraries) 81 # else 82 # define BOOST_DETAIL_NO_CONTAINER_FWD 83 # endif 84 #endif 85 86 #if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) 87 88 #if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \ 89 !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) 90 91 #include <deque> 92 #include <list> 93 #include <vector> 94 #include <map> 95 #include <set> 96 #include <bitset> 97 #include <string> 98 #include <complex> 99 100 #else 101 102 #include <cstddef> 103 104 #if defined(BOOST_CONTAINER_FWD_BAD_DEQUE) 105 #include <deque> 106 #endif 107 108 #if defined(BOOST_CONTAINER_FWD_BAD_BITSET) 109 #include <bitset> 110 #endif 111 112 #if defined(BOOST_MSVC) 113 #pragma warning(push) 114 #pragma warning(disable:4099) // struct/class mismatch in fwd declarations 115 #endif 116 117 namespace std 118 { 119 template <class T> class allocator; 120 template <class charT, class traits, class Allocator> class basic_string; 121 122 template <class charT> struct char_traits; 123 124 #if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) 125 template <class T> struct complex; 126 #else 127 template <class T> class complex; 128 #endif 129 130 #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) 131 template <class T, class Allocator> class deque; 132 #endif 133 134 template <class T, class Allocator> class list; 135 template <class T, class Allocator> class vector; 136 template <class Key, class T, class Compare, class Allocator> class map; 137 template <class Key, class T, class Compare, class Allocator> 138 class multimap; 139 template <class Key, class Compare, class Allocator> class set; 140 template <class Key, class Compare, class Allocator> class multiset; 141 142 #if !defined(BOOST_CONTAINER_FWD_BAD_BITSET) 143 template <size_t N> class bitset; 144 #endif 145 template <class T1, class T2> struct pair; 146 } 147 148 #if defined(BOOST_MSVC) 149 #pragma warning(pop) 150 #endif 151 152 #endif // BOOST_DETAIL_NO_CONTAINER_FWD && 153 // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) 154 155 #endif // BOOST_DETAIL_TEST_CONFIG_ONLY 156 157 #endif 158