summaryrefslogtreecommitdiff
path: root/boost/interprocess/detail/type_traits.hpp
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
committerChanho Park <chanho61.park@samsung.com>2014-12-11 18:55:56 +0900
commit08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch)
tree7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/interprocess/detail/type_traits.hpp
parentbb4dd8289b351fae6b55e303f189127a394a1edd (diff)
downloadboost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/interprocess/detail/type_traits.hpp')
-rw-r--r--boost/interprocess/detail/type_traits.hpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/boost/interprocess/detail/type_traits.hpp b/boost/interprocess/detail/type_traits.hpp
index 7a582fee5c..e56a495754 100644
--- a/boost/interprocess/detail/type_traits.hpp
+++ b/boost/interprocess/detail/type_traits.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
// (C) Copyright John Maddock 2000.
-// (C) Copyright Ion Gaztanaga 2005-2011.
+// (C) Copyright Ion Gaztanaga 2005-2012.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,7 +13,7 @@
#ifndef BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP
#define BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -117,6 +117,12 @@ struct remove_volatile<volatile T>
typedef T type;
};
+template<class T>
+struct remove_const_volatile
+{
+ typedef typename remove_const<typename remove_volatile<T>::type>::type type;
+};
+
template <typename T, typename U>
struct is_same
{
@@ -136,6 +142,13 @@ struct is_same
static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u));
};
+template<class T, class U>
+struct is_cv_same
+{
+ static const bool value = is_same< typename remove_const_volatile<T>::type
+ , typename remove_const_volatile<U>::type >::value;
+};
+
} // namespace ipcdetail
} //namespace interprocess {
} //namespace boost {