|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75856 - trunk/boost/unordered
From: dnljms_at_[hidden]
Date: 2011-12-07 14:18:16
Author: danieljames
Date: 2011-12-07 14:18:11 EST (Wed, 07 Dec 2011)
New Revision: 75856
URL: http://svn.boost.org/trac/boost/changeset/75856
Log:
Unordered: Fix forwarding from emplace.
Text files modified:
trunk/boost/unordered/unordered_map.hpp | 50 +++++++++++++++++++++++++++++----------
trunk/boost/unordered/unordered_set.hpp | 48 ++++++++++++++++++++++++++++---------
2 files changed, 73 insertions(+), 25 deletions(-)
Modified: trunk/boost/unordered/unordered_map.hpp
==============================================================================
--- trunk/boost/unordered/unordered_map.hpp (original)
+++ trunk/boost/unordered/unordered_map.hpp 2011-12-07 14:18:11 EST (Wed, 07 Dec 2011)
@@ -78,7 +78,7 @@
private:
table table_;
-
+
public:
// constructors
@@ -251,7 +251,8 @@
std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -259,7 +260,8 @@
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
).first;
}
@@ -269,7 +271,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -279,7 +283,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
).first;
}
@@ -290,7 +296,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
@@ -301,7 +310,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
).first;
}
@@ -700,7 +712,8 @@
iterator emplace(BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -708,7 +721,8 @@
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -718,7 +732,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -728,7 +744,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -739,7 +757,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
@@ -750,7 +771,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
Modified: trunk/boost/unordered/unordered_set.hpp
==============================================================================
--- trunk/boost/unordered/unordered_set.hpp (original)
+++ trunk/boost/unordered/unordered_set.hpp 2011-12-07 14:18:11 EST (Wed, 07 Dec 2011)
@@ -249,7 +249,8 @@
std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -257,7 +258,8 @@
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
).first;
}
@@ -267,7 +269,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -277,7 +281,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
).first;
}
@@ -288,7 +294,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
@@ -299,7 +308,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
).first;
}
@@ -683,7 +695,8 @@
iterator emplace(BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -691,7 +704,8 @@
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0))
);
}
@@ -701,7 +715,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -711,7 +727,9 @@
BOOST_FWD_REF(A1) a1)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1))
);
}
@@ -722,7 +740,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
@@ -733,7 +754,10 @@
BOOST_FWD_REF(A2) a2)
{
return table_.emplace(
- boost::unordered::detail::create_emplace_args(a0, a1, a2)
+ boost::unordered::detail::create_emplace_args(
+ boost::forward<A0>(a0),
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2))
);
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk