]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/include/boost/type_traits/remove_reference.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / include / boost / type_traits / remove_reference.hpp
1
2 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6 //
7 // See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
9 #ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
10 #define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
11
12 #include <boost/config.hpp>
13 #include <boost/detail/workaround.hpp>
14
15 namespace boost {
16
17
18 namespace detail{
19 //
20 // We can't filter out rvalue_references at the same level as
21 // references or we get ambiguities from msvc:
22 //
23 template <class T>
24 struct remove_rvalue_ref
25 {
26 typedef T type;
27 };
28 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
29 template <class T>
30 struct remove_rvalue_ref<T&&>
31 {
32 typedef T type;
33 };
34 #endif
35
36 } // namespace detail
37
38 template <class T> struct remove_reference{ typedef typename boost::detail::remove_rvalue_ref<T>::type type; };
39 template <class T> struct remove_reference<T&>{ typedef T type; };
40
41 #if defined(BOOST_ILLEGAL_CV_REFERENCES)
42 // these are illegal specialisations; cv-qualifies applied to
43 // references have no effect according to [8.3.2p1],
44 // C++ Builder requires them though as it treats cv-qualified
45 // references as distinct types...
46 template <class T> struct remove_reference<T&const>{ typedef T type; };
47 template <class T> struct remove_reference<T&volatile>{ typedef T type; };
48 template <class T> struct remove_reference<T&const volatile>{ typedef T type; };
49 #endif
50
51
52 } // namespace boost
53
54 #endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED