libstdc++: Fix definition of std::remove_cvref_t
authorJonathan Wakely <jwakely@redhat.com>
Thu, 6 May 2021 12:40:53 +0000 (13:40 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 6 May 2021 12:41:15 +0000 (13:41 +0100)
commit0e79e63026e43ad0577812ffb405dac8fa88af5b
treeff76972f5a5fe24d997096ad038c70d48845ac0f
parent741155468610196bc9fa03cab92902d012b32654
libstdc++: Fix definition of std::remove_cvref_t

I originally defined std::remove_cvref_t in terms of the internal
__remove_cvref_t trait, to avoid instantiating the remove_cvref class
template. However, as described in P1715R0 that is observable by users
and is thus non-conforming.

This defines remove_cvref_t as specified in the standard.

libstdc++-v3/ChangeLog:

* include/std/type_traits (remove_cvref_t): Define in terms of
remove_cvref.
* testsuite/20_util/remove_cvref/value.cc: Check alias.
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/remove_cvref/value.cc