diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
commit | b8cf34c691623e4ec329053cbbf68522a855882d (patch) | |
tree | 34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/type_erasure/detail/storage.hpp | |
parent | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff) | |
download | boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2 boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip |
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/type_erasure/detail/storage.hpp')
-rw-r--r-- | boost/type_erasure/detail/storage.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/boost/type_erasure/detail/storage.hpp b/boost/type_erasure/detail/storage.hpp index 8f8bf865ea..8e572871f3 100644 --- a/boost/type_erasure/detail/storage.hpp +++ b/boost/type_erasure/detail/storage.hpp @@ -13,7 +13,7 @@ #include <boost/config.hpp> #include <boost/type_traits/remove_reference.hpp> -#include <boost/type_traits/remove_cv.hpp> +#include <boost/type_traits/decay.hpp> #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES # include <utility> // for std::forward, std::move @@ -37,11 +37,10 @@ struct storage storage(storage&& other) : data(other.data) {} storage& operator=(const storage& other) { data = other.data; return *this; } template<class T> - explicit storage(T&& arg) : data(new typename remove_cv< - typename remove_reference<T>::type>::type(std::forward<T>(arg))) {} + explicit storage(T&& arg) : data(new typename boost::decay<T>::type(std::forward<T>(arg))) {} #else template<class T> - explicit storage(const T& arg) : data(new T(arg)) {} + explicit storage(const T& arg) : data(new typename boost::decay<T>::type(arg)) {} #endif void* data; }; |