This patch optimizes the compilation performance of
std::remove_all_extents by dispatching to the new
__remove_all_extents built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_all_extents): Use
__remove_all_extents built-in trait.
Signed-off-by: Ken Matsui <kmatsui@gcc.gnu.org>
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
#endif
/// remove_all_extents
+#if _GLIBCXX_USE_BUILTIN_TRAIT(__remove_all_extents)
+ template<typename _Tp>
+ struct remove_all_extents
+ { using type = __remove_all_extents(_Tp); };
+#else
template<typename _Tp>
struct remove_all_extents
{ using type = _Tp; };
template<typename _Tp>
struct remove_all_extents<_Tp[]>
{ using type = typename remove_all_extents<_Tp>::type; };
+#endif
#if __cplusplus > 201103L
/// Alias template for remove_extent