forked from boostorg/type_traits
Add remove_cv_ref
This commit is contained in:
1 parent
85df11dad2
commit
8a3d01a5ea
5 files changed
+221
No files matched your search
@@ -0,0 +1,44 @@
|
||||
[/
|
||||
Copyright 2007 John Maddock.
|
||||
Copyright 2017 Peter Dimov.
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt).
|
||||
]
|
||||
|
||||
[section:remove_cv_ref remove_cv_ref]
|
||||
|
||||
template <class T>
|
||||
struct remove_cv_ref
|
||||
{
|
||||
typedef __below type;
|
||||
};
|
||||
|
||||
template <class T> using remove_cv_ref_t = typename remove_cv_ref<T>::type; // C++11 and above
|
||||
|
||||
__type The same type as `T`, but with any reference modifiers and /top level/ cv-qualifiers removed.
|
||||
|
||||
__std_ref 3.9.3, 8.3.2.
|
||||
|
||||
[all_compilers]
|
||||
|
||||
__header ` #include <boost/type_traits/remove_cv_ref.hpp>` or ` #include <boost/type_traits.hpp>`
|
||||
|
||||
[table Examples
|
||||
|
||||
[ [Expression] [Result Type]]
|
||||
|
||||
[[`remove_cv_ref<int>::type`][`int`]]
|
||||
|
||||
[[`remove_cv_ref<int const>::type`] [`int`]]
|
||||
|
||||
[[`remove_cv_ref<int const volatile>::type`] [`int`]]
|
||||
|
||||
[[`remove_cv_ref<int const&>::type`] [`int`]]
|
||||
|
||||
[[`remove_cv_ref<int const*>::type`] [`int const*`]]
|
||||
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
[def __remove_const [link boost_typetraits.reference.remove_const remove_const]]
|
||||
[def __remove_volatile [link boost_typetraits.reference.remove_volatile remove_volatile]]
|
||||
[def __remove_cv [link boost_typetraits.reference.remove_cv remove_cv]]
|
||||
[def __remove_cv_ref [link boost_typetraits.reference.remove_cv_ref remove_cv_ref]]
|
||||
[def __remove_reference [link boost_typetraits.reference.remove_reference remove_reference]]
|
||||
[def __remove_extent [link boost_typetraits.reference.remove_extent remove_extent]]
|
||||
[def __remove_all_extents [link boost_typetraits.reference.remove_all_extents remove_all_extents]]
|
||||
@@ -325,6 +326,7 @@ See __has_trivial_constructor.
|
||||
[include remove_all_extents.qbk]
|
||||
[include remove_const.qbk]
|
||||
[include remove_cv.qbk]
|
||||
[include remove_cv_ref.qbk]
|
||||
[include remove_extent.qbk]
|
||||
[include remove_pointer.qbk]
|
||||
[include remove_reference.qbk]
|
||||
|
||||
Reference in new issue
Block a user