diff options
Diffstat (limited to 'boost/flyweight/assoc_container_factory.hpp')
-rw-r--r-- | boost/flyweight/assoc_container_factory.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/boost/flyweight/assoc_container_factory.hpp b/boost/flyweight/assoc_container_factory.hpp index bb5ae76541..96deee3ee9 100644 --- a/boost/flyweight/assoc_container_factory.hpp +++ b/boost/flyweight/assoc_container_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_ASSOC_CONTAINER_FACTORY_HPP #define BOOST_FLYWEIGHT_ASSOC_CONTAINER_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 + namespace boost{namespace flyweights{namespace detail{ BOOST_FLYWEIGHT_NESTED_XXX_IF_NOT_PLACEHOLDER_EXPRESSION_DEF(iterator); BOOST_FLYWEIGHT_NESTED_XXX_IF_NOT_PLACEHOLDER_EXPRESSION_DEF(value_type); @@ -57,6 +61,13 @@ public: return cont.insert(x).first; } +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + handle_type insert(entry_type&& x) + { + return cont.insert(std::move(x)).first; + } +#endif + void erase(handle_type h) { cont.erase(h); |