OSDN Git Service

2009-03-14 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Mar 2009 00:56:31 +0000 (00:56 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Mar 2009 00:56:31 +0000 (00:56 +0000)
* include/std/type_traits (__add_lvalue_reference_helper,
__add_rvalue_reference_helper): As an optimization, rewrite
condition (avoid is_function).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144868 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits

index 68154d1..98bf0c5 100644 (file)
@@ -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
index 132a924..130d504 100644 (file)
@@ -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; };