aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2009-03-15 00:56:31 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2009-03-15 00:56:31 +0000
commit58366b08d75c36e76695b8dedda3aecb38e4dc51 (patch)
treeff1fb19c14277301a7f77449c67569a7191870cc
parentb16a6196886f9b9cfc474968ac6c948cda7d2888 (diff)
downloadgcc-58366b08d75c36e76695b8dedda3aecb38e4dc51.zip
gcc-58366b08d75c36e76695b8dedda3aecb38e4dc51.tar.gz
gcc-58366b08d75c36e76695b8dedda3aecb38e4dc51.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/std/type_traits4
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 68154d1..98bf0c5 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 132a924..130d504 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; };