summaryrefslogtreecommitdiff
path: root/boost/assign/std/stack.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/assign/std/stack.hpp')
-rw-r--r--boost/assign/std/stack.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/boost/assign/std/stack.hpp b/boost/assign/std/stack.hpp
index e528f169b1..5b0e07c9c6 100644
--- a/boost/assign/std/stack.hpp
+++ b/boost/assign/std/stack.hpp
@@ -17,12 +17,14 @@
#include <boost/assign/list_inserter.hpp>
#include <boost/config.hpp>
+#include <boost/move/utility.hpp>
#include <stack>
namespace boost
{
namespace assign
{
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template< class V, class C, class V2 >
inline list_inserter< assign_detail::call_push< std::stack<V,C> >, V >
@@ -30,7 +32,17 @@ namespace assign
{
return push( c )( v );
}
-
+
+#else
+
+ template< class V, class C, class V2 >
+ inline list_inserter< assign_detail::call_push< std::stack<V, C> >, V >
+ operator+=(std::stack<V, C>& c, V2&& v)
+ {
+ return push(c)(boost::forward<V2>(v));
+ }
+
+#endif
}
}