comparison DEPENDENCIES/generic/include/boost/align/detail/remove_traits.hpp @ 102:f46d142149f5

Whoops, finish that update
author Chris Cannam
date Mon, 07 Sep 2015 11:13:41 +0100
parents
children
comparison
equal deleted inserted replaced
101:c530137014c0 102:f46d142149f5
1 /*
2 (c) 2014 Glen Joseph Fernandes
3 glenjofe at gmail dot com
4
5 Distributed under the Boost Software
6 License, Version 1.0.
7 http://boost.org/LICENSE_1_0.txt
8 */
9 #ifndef BOOST_ALIGN_DETAIL_REMOVE_TRAITS_HPP
10 #define BOOST_ALIGN_DETAIL_REMOVE_TRAITS_HPP
11
12 #include <boost/config.hpp>
13
14 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
15 #include <type_traits>
16 #else
17 #include <cstddef>
18 #endif
19
20 namespace boost {
21 namespace alignment {
22 namespace detail {
23 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
24 using std::remove_reference;
25 using std::remove_all_extents;
26 using std::remove_cv;
27 #else
28 template<class T>
29 struct remove_reference {
30 typedef T type;
31 };
32
33 template<class T>
34 struct remove_reference<T&> {
35 typedef T type;
36 };
37
38 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
39 template<class T>
40 struct remove_reference<T&&> {
41 typedef T type;
42 };
43 #endif
44
45 template<class T>
46 struct remove_all_extents {
47 typedef T type;
48 };
49
50 template<class T>
51 struct remove_all_extents<T[]> {
52 typedef typename remove_all_extents<T>::type type;
53 };
54
55 template<class T, std::size_t N>
56 struct remove_all_extents<T[N]> {
57 typedef typename remove_all_extents<T>::type type;
58 };
59
60 template<class T>
61 struct remove_const {
62 typedef T type;
63 };
64
65 template<class T>
66 struct remove_const<const T> {
67 typedef T type;
68 };
69
70 template<class T>
71 struct remove_volatile {
72 typedef T type;
73 };
74
75 template<class T>
76 struct remove_volatile<volatile T> {
77 typedef T type;
78 };
79
80 template<class T>
81 struct remove_cv {
82 typedef typename remove_volatile<typename
83 remove_const<T>::type>::type type;
84 };
85 #endif
86 }
87 }
88 }
89
90 #endif