Optimise std::remove_cv and use more helper aliases
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Sep 2019 07:35:36 +0000 (08:35 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Sep 2019 07:35:36 +0000 (08:35 +0100)
commit391d5d2e30aee5c2c6cce96399758e8ade836536
tree92bb2a04247d663fd9a76b0e7da3696f90eb6b24
parent4563bc4dc63664a64cb9ce6c426c689619c209e4
Optimise std::remove_cv and use more helper aliases

Define partial specializations for std::remove_cv so that
std::remove_const and std::remove_volatile don't need to be
instantiated.

* include/std/type_traits (__remove_cv_t): New alias template.
(is_void, is_integral, is_floating_point, is_pointer)
(is_member_object_pointer, is_member_function_pointer, is_null_pointer)
(is_member_point), __is_signed_integer, __is_unsigned_integer)
(__make_unsigned_selector, __make_signed_selector, remove_pointer)
(__decay_selector): Use __remove_cv_t.
(remove_cv): Add partial specializations for cv-qualified types.
(__decay_t): New alias template.
(__decay_and_strip, __common_type_impl, __result_of_impl): Use
__decay_t.
(__enable_if_t): Move earlier in the file.
(_Require): Use __enable_if_t.
(swap(T&, T&)): Use _Require.
(swap(T(&)[N])): Use __enable_if_t.

From-SVN: r275562
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits