From 58366b08d75c36e76695b8dedda3aecb38e4dc51 Mon Sep 17 00:00:00 2001 From: Paolo Carlini <paolo.carlini@oracle.com> Date: Sun, 15 Mar 2009 00:56:31 +0000 Subject: [PATCH] type_traits (__add_lvalue_reference_helper, [...]): As an optimization, rewrite condition (avoid is_function). 2009-03-14 Paolo Carlini <paolo.carlini@oracle.com> * include/std/type_traits (__add_lvalue_reference_helper, __add_rvalue_reference_helper): As an optimization, rewrite condition (avoid is_function). From-SVN: r144868 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/std/type_traits | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 68154d175b41..98bf0c5551d2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2009-03-14 Paolo Carlini <paolo.carlini@oracle.com> + + * include/std/type_traits (__add_lvalue_reference_helper, + __add_rvalue_reference_helper): As an optimization, rewrite + condition (avoid is_function). + 2009-03-13 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/39405 diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 132a92459e3d..130d504d9030 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -111,7 +111,7 @@ namespace std { typedef _Tp type; }; template<typename _Tp, - bool = is_object<_Tp>::value || is_function<_Tp>::value, + bool = !is_reference<_Tp>::value && !is_void<_Tp>::value, bool = is_rvalue_reference<_Tp>::value> struct __add_lvalue_reference_helper { typedef _Tp type; }; @@ -131,7 +131,7 @@ namespace std { }; template<typename _Tp, - bool = is_object<_Tp>::value || is_function<_Tp>::value> + bool = !is_reference<_Tp>::value && !is_void<_Tp>::value> struct __add_rvalue_reference_helper { typedef _Tp type; }; -- GitLab