]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/std/type_traits
libstdc++: Optimize std::decay
authorJonathan Wakely <jwakely@redhat.com>
Thu, 1 Sep 2022 12:06:13 +0000 (13:06 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 1 Sep 2022 19:31:00 +0000 (20:31 +0100)
commit775fe01b38933850dcb884733c4d0edc7cde45c3
tree660784718f15833fe4d53df908bda00f71862129
parent33005a4be49466880fe3f5a9317bccc8c1ed423b
libstdc++: Optimize std::decay

Define partial specializations of std::decay and its __decay_selector
helper so that remove_reference, is_array and is_function are not
instantiated for every type, and remove_extent is not instantiated for
arrays.

libstdc++-v3/ChangeLog:

* include/std/type_traits (__decay_selector): Add partial
specializations for array types. Only check for function types
when not dealing with an array.
(decay): Add partial specializations for reference types.
libstdc++-v3/include/std/type_traits