Chris@16: Chris@16: // Copyright 2005-2011 Daniel James. Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // Note: if you change this include guard, you also need to change Chris@16: // container_fwd_compile_fail.cpp Chris@16: #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) Chris@16: #define BOOST_DETAIL_CONTAINER_FWD_HPP Chris@16: Chris@101: #if defined(_MSC_VER) && \ Chris@16: !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: //////////////////////////////////////////////////////////////////////////////// Chris@16: // // Chris@16: // Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to // Chris@16: // forward declare standard containers. // Chris@16: // // Chris@16: // BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it // Chris@16: // normally doesn't. // Chris@16: // // Chris@16: // BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. // Chris@16: // // Chris@16: //////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: #if !defined(BOOST_DETAIL_NO_CONTAINER_FWD) Chris@16: # if defined(BOOST_DETAIL_CONTAINER_FWD) Chris@16: // Force forward declarations. Chris@16: # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) Chris@16: // STLport Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif defined(__LIBCOMO__) Chris@16: // Comeau STL: Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) Chris@16: // Rogue Wave library: Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif defined(_LIBCPP_VERSION) Chris@16: // libc++ Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif defined(__GLIBCPP__) || defined(__GLIBCXX__) Chris@16: // GNU libstdc++ 3 Chris@16: // Chris@16: // Disable forwarding for all recent versions, as the library has a Chris@16: // versioned namespace mode, and I don't know how to detect it. Chris@16: # if __GLIBCXX__ >= 20070513 \ Chris@16: || defined(_GLIBCXX_DEBUG) \ Chris@16: || defined(_GLIBCXX_PARALLEL) \ Chris@16: || defined(_GLIBCXX_PROFILE) Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # else Chris@16: # if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530 Chris@16: # define BOOST_CONTAINER_FWD_COMPLEX_STRUCT Chris@16: # endif Chris@16: # endif Chris@16: # elif defined(__STL_CONFIG_H) Chris@16: // generic SGI STL Chris@16: // Chris@16: // Forward declaration seems to be okay, but it has a couple of odd Chris@16: // implementations. Chris@16: # define BOOST_CONTAINER_FWD_BAD_BITSET Chris@16: # if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) Chris@16: # define BOOST_CONTAINER_FWD_BAD_DEQUE Chris@16: # endif Chris@16: # elif defined(__MSL_CPP__) Chris@16: // MSL standard lib: Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif defined(__IBMCPP__) Chris@16: // The default VACPP std lib, forward declaration seems to be fine. Chris@16: # elif defined(MSIPL_COMPILE_H) Chris@16: // Modena C++ standard library Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) Chris@16: // Dinkumware Library (this has to appear after any possible replacement Chris@16: // libraries) Chris@16: # else Chris@16: # define BOOST_DETAIL_NO_CONTAINER_FWD Chris@16: # endif Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) Chris@16: Chris@16: #if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \ Chris@16: !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #else Chris@16: Chris@16: #include Chris@16: Chris@16: #if defined(BOOST_CONTAINER_FWD_BAD_DEQUE) Chris@16: #include Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_CONTAINER_FWD_BAD_BITSET) Chris@16: #include Chris@16: #endif Chris@16: Chris@16: #if defined(BOOST_MSVC) Chris@16: #pragma warning(push) Chris@16: #pragma warning(disable:4099) // struct/class mismatch in fwd declarations Chris@16: #endif Chris@16: Chris@16: namespace std Chris@16: { Chris@16: template class allocator; Chris@16: template class basic_string; Chris@16: Chris@16: template struct char_traits; Chris@16: Chris@16: #if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) Chris@16: template struct complex; Chris@16: #else Chris@16: template class complex; Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) Chris@16: template class deque; Chris@16: #endif Chris@16: Chris@16: template class list; Chris@16: template class vector; Chris@16: template class map; Chris@16: template Chris@16: class multimap; Chris@16: template class set; Chris@16: template class multiset; Chris@16: Chris@16: #if !defined(BOOST_CONTAINER_FWD_BAD_BITSET) Chris@16: template class bitset; Chris@16: #endif Chris@16: template struct pair; Chris@16: } Chris@16: Chris@16: #if defined(BOOST_MSVC) Chris@16: #pragma warning(pop) Chris@16: #endif Chris@16: Chris@16: #endif // BOOST_DETAIL_NO_CONTAINER_FWD && Chris@16: // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) Chris@16: Chris@16: #endif // BOOST_DETAIL_TEST_CONFIG_ONLY Chris@16: Chris@16: #endif