forked from boostorg/unordered
Unordered: Better std::forward/move configuration.
[SVN r73592]
This commit is contained in:
@@ -424,7 +424,7 @@ namespace boost { namespace unordered { namespace detail {
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Node Constructors
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
template <class T, class... Args>
|
||||
inline void construct_impl(T*, void* address, Args&&... args)
|
||||
@@ -495,7 +495,7 @@ namespace boost { namespace unordered { namespace detail {
|
||||
~node_constructor();
|
||||
void construct_preamble();
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
void construct(Args&&... args)
|
||||
{
|
||||
|
@@ -200,7 +200,7 @@ namespace boost { namespace unordered { namespace detail {
|
||||
this->find_node(bucket_index, hash, k));
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
template <class... Args>
|
||||
node_ptr emplace(Args&&... args)
|
||||
|
@@ -43,7 +43,7 @@ namespace detail {
|
||||
return no_key();
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
static no_key extract(Args const&...)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace detail {
|
||||
return v.first;
|
||||
}
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class Arg1, class... Args>
|
||||
static key_type const& extract(key_type const& k,
|
||||
Arg1 const&, Args const&...)
|
||||
|
@@ -186,7 +186,7 @@ namespace boost { namespace unordered { namespace detail {
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
template<class... Args>
|
||||
emplace_return emplace(Args&&... args)
|
||||
|
@@ -41,9 +41,20 @@
|
||||
#if !defined(BOOST_NO_RVALUE_REFERENCES) && \
|
||||
!defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
// STLport doesn't have std::forward.
|
||||
# else
|
||||
# define BOOST_UNORDERED_STD_FORWARD
|
||||
# elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
# elif defined(_LIBCPP_VERSION)
|
||||
# define BOOST_UNORDERED_STD_FORWARD_MOVE
|
||||
# elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
# if defined(__GLIBCXX__) && __GLIBCXX__ >= 20090804
|
||||
# define BOOST_UNORDERED_STD_FORWARD_MOVE
|
||||
# endif
|
||||
# elif defined(__STL_CONFIG_H)
|
||||
# elif defined(__MSL_CPP__)
|
||||
# elif defined(__IBMCPP__)
|
||||
# elif defined(MSIPL_COMPILE_H)
|
||||
# elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
// Visual C++. A version check would be a good idea.
|
||||
# define BOOST_UNORDERED_STD_FORWARD_MOVE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -51,7 +62,7 @@
|
||||
#define BOOST_UNORDERED_EMPLACE_LIMIT 10
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if !defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
@@ -216,7 +216,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
std::pair<iterator, bool> emplace(Args&&...);
|
||||
template <class... Args>
|
||||
@@ -563,7 +563,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
iterator emplace(Args&&...);
|
||||
template <class... Args>
|
||||
@@ -840,7 +840,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class... Args>
|
||||
std::pair<BOOST_DEDUCED_TYPENAME unordered_map<K,T,H,P,A>::iterator, bool>
|
||||
@@ -1279,7 +1279,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
template <class K, class T, class H, class P, class A>
|
||||
template <class... Args>
|
||||
|
@@ -213,7 +213,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
std::pair<iterator, bool> emplace(Args&&...);
|
||||
template <class... Args>
|
||||
@@ -540,7 +540,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class... Args>
|
||||
iterator emplace(Args&&...);
|
||||
template <class... Args>
|
||||
@@ -805,7 +805,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
template <class T, class H, class P, class A>
|
||||
template <class... Args>
|
||||
std::pair<BOOST_DEDUCED_TYPENAME unordered_set<T,H,P,A>::iterator, bool>
|
||||
@@ -1190,7 +1190,7 @@ namespace unordered
|
||||
|
||||
// modifiers
|
||||
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD)
|
||||
#if defined(BOOST_UNORDERED_STD_FORWARD_MOVE)
|
||||
|
||||
template <class T, class H, class P, class A>
|
||||
template <class... Args>
|
||||
|
Reference in New Issue
Block a user