2011-06-04 16:17:07 +00:00
|
|
|
|
2016-10-02 17:56:01 +01:00
|
|
|
// Copyright (C) 2008-2016 Daniel James.
|
2011-06-04 16:17:07 +00:00
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
#ifndef BOOST_UNORDERED_FWD_HPP_INCLUDED
|
|
|
|
#define BOOST_UNORDERED_FWD_HPP_INCLUDED
|
|
|
|
|
2013-11-16 20:13:24 +00:00
|
|
|
#include <boost/config.hpp>
|
|
|
|
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
|
|
|
#pragma once
|
2011-06-04 16:17:07 +00:00
|
|
|
#endif
|
|
|
|
|
2016-10-02 17:56:01 +01:00
|
|
|
#if defined(BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT)
|
|
|
|
// Already defined.
|
|
|
|
#elif defined(BOOST_LIBSTDCXX11)
|
|
|
|
// https://github.com/gcc-mirror/gcc/blob/gcc-4_6-branch/libstdc++-v3/include/bits/stl_pair.h#L70
|
2017-02-19 13:05:17 +00:00
|
|
|
#if BOOST_LIBSTDCXX_VERSION > 40600
|
|
|
|
#define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
|
|
|
|
#endif
|
2016-10-02 17:56:01 +01:00
|
|
|
#elif defined(_LIBCPP_VERSION)
|
|
|
|
// https://github.com/llvm-mirror/libcxx/blob/release_30/include/utility#L206
|
2017-05-03 04:21:52 +01:00
|
|
|
#if _LIBCPP_VERSION >= 3000
|
2017-02-19 13:05:17 +00:00
|
|
|
#define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
|
|
|
|
#endif
|
2016-10-02 17:56:01 +01:00
|
|
|
#elif defined(BOOST_MSVC)
|
|
|
|
// Apparently C++11 standard supported in Visual Studio 2012
|
|
|
|
// https://msdn.microsoft.com/en-us/library/hh567368.aspx#stl
|
|
|
|
// 2012 = VC+11 = BOOST_MSVC 1700 Hopefully!
|
2017-02-19 13:05:17 +00:00
|
|
|
#if BOOST_MSVC >= 1700
|
|
|
|
#define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 1
|
|
|
|
#endif
|
2016-10-02 17:56:01 +01:00
|
|
|
#endif
|
|
|
|
|
2017-06-04 08:46:59 +01:00
|
|
|
// TODO: Use piecewise construction by default? Is it safe to assume that an
|
|
|
|
// unknown library has it?
|
2016-10-02 17:56:01 +01:00
|
|
|
#if !defined(BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT)
|
|
|
|
#define BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
|
|
|
|
#include <utility>
|
|
|
|
#endif
|
|
|
|
|
2017-02-19 13:05:17 +00:00
|
|
|
namespace boost {
|
2017-06-11 20:55:59 +01:00
|
|
|
namespace unordered {
|
2016-10-02 17:56:01 +01:00
|
|
|
#if BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT
|
2017-06-11 20:55:59 +01:00
|
|
|
using std::piecewise_construct_t;
|
|
|
|
using std::piecewise_construct;
|
2016-10-02 17:56:01 +01:00
|
|
|
#else
|
2017-06-11 20:55:59 +01:00
|
|
|
struct piecewise_construct_t
|
|
|
|
{
|
|
|
|
};
|
|
|
|
const piecewise_construct_t piecewise_construct = piecewise_construct_t();
|
2016-10-02 17:56:01 +01:00
|
|
|
#endif
|
2017-06-11 20:55:59 +01:00
|
|
|
}
|
2011-06-04 16:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|