summaryrefslogtreecommitdiff
path: root/boost/flyweight/hashed_factory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/flyweight/hashed_factory.hpp')
-rw-r--r--boost/flyweight/hashed_factory.hpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/boost/flyweight/hashed_factory.hpp b/boost/flyweight/hashed_factory.hpp
index 18062aae8b..899eb619e7 100644
--- a/boost/flyweight/hashed_factory.hpp
+++ b/boost/flyweight/hashed_factory.hpp
@@ -1,4 +1,4 @@
-/* Copyright 2006-2009 Joaquin M Lopez Munoz.
+/* Copyright 2006-2014 Joaquin M Lopez Munoz.
* 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)
@@ -9,7 +9,7 @@
#ifndef BOOST_FLYWEIGHT_HASHED_FACTORY_HPP
#define BOOST_FLYWEIGHT_HASHED_FACTORY_HPP
-#if defined(_MSC_VER)&&(_MSC_VER>=1200)
+#if defined(_MSC_VER)
#pragma once
#endif
@@ -22,6 +22,10 @@
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/if.hpp>
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#include <utility>
+#endif
+
/* Flyweight factory based on a hashed container implemented
* with Boost.MultiIndex.
*/
@@ -72,6 +76,13 @@ public:
return &*cont.insert(x).first;
}
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ handle_type insert(Entry&& x)
+ {
+ return &*cont.insert(std::move(x)).first;
+ }
+#endif
+
void erase(handle_type h)
{
cont.erase(cont.iterator_to(*h));