2 // Copyright (C) 2008-2016 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 #ifndef BOOST_UNORDERED_FWD_HPP_INCLUDED
7 #define BOOST_UNORDERED_FWD_HPP_INCLUDED
9 #include <boost/config.hpp>
10 #if defined(BOOST_HAS_PRAGMA_ONCE)
14 #if defined(BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT)
16 #elif defined(BOOST_LIBSTDCXX11)
17 // https://github.com/gcc-mirror/gcc/blob/gcc-4_6-branch/libstdc++-v3/include/bits/stl_pair.h#L70
18 # if BOOST_LIBSTDCXX_VERSION > 40600
19 # define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
21 #elif defined(_LIBCPP_VERSION)
22 // https://github.com/llvm-mirror/libcxx/blob/release_30/include/utility#L206
23 # if LIBCPP_VERSION >= 3000
24 # define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
26 #elif defined(BOOST_MSVC)
27 // Apparently C++11 standard supported in Visual Studio 2012
28 // https://msdn.microsoft.com/en-us/library/hh567368.aspx#stl
29 // 2012 = VC+11 = BOOST_MSVC 1700 Hopefully!
30 # if BOOST_MSVC >= 1700
31 # define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
35 #if !defined(BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT)
36 #define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 0
39 #if BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
47 #if BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
48 using std::piecewise_construct_t;
49 using std::piecewise_construct;
51 struct piecewise_construct_t {};
52 const piecewise_construct_t piecewise_construct = piecewise_construct_t();