blob: 6eea8f11115002aa4fa5893b27cad4f1b8f40193 [file] [log] [blame]
Brian Silverman4a2409e2018-08-04 23:24:02 -07001[/
2 Copyright 2007 John Maddock.
3 Copyright 2017 Peter Dimov.
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt).
7]
8
9[section:remove_cv_ref remove_cv_ref]
10
11 template <class T>
12 struct remove_cv_ref
13 {
14 typedef __below type;
15 };
16
17 template <class T> using remove_cv_ref_t = typename remove_cv_ref<T>::type; // C++11 and above
18
19__type The same type as `T`, but with any reference modifiers and /top level/ cv-qualifiers removed.
20
21__std_ref 3.9.3, 8.3.2.
22
23[all_compilers]
24
25__header ` #include <boost/type_traits/remove_cv_ref.hpp>` or ` #include <boost/type_traits.hpp>`
26
27[table Examples
28
29[ [Expression] [Result Type]]
30
31[[`remove_cv_ref<int>::type`][`int`]]
32
33[[`remove_cv_ref<int const>::type`] [`int`]]
34
35[[`remove_cv_ref<int const volatile>::type`] [`int`]]
36
37[[`remove_cv_ref<int const&>::type`] [`int`]]
38
39[[`remove_cv_ref<int const*>::type`] [`int const*`]]
40
41]
42
43[endsect]
44