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// should be the last #include
16#include <boost/type_traits/detail/type_trait_def.hpp>
17
18namespace boost {
19
20
21namespace detail{
22//
23// We can't filter out rvalue_references at the same level as
24// references or we get ambiguities from msvc:
25//
26template <class T>
27struct remove_rvalue_ref
28{
29 typedef T type;
30};
31#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
32template <class T>
33struct remove_rvalue_ref<T&&>
34{
35 typedef T type;
36};
37#endif
38
39} // namespace detail
40
41BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_rvalue_ref<T>::type)
42BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
43
44#if defined(BOOST_ILLEGAL_CV_REFERENCES)
45// these are illegal specialisations; cv-qualifies applied to
46// references have no effect according to [8.3.2p1],
47// C++ Builder requires them though as it treats cv-qualified
48// references as distinct types...
49BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const,T)
50BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,T)
51BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T)
52#endif
53
54
55} // namespace boost
56
57#include <boost/type_traits/detail/type_trait_undef.hpp>
58
59#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
60