]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
type_traits (is_signed): Simplify.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 22 Apr 2013 15:27:54 +0000 (15:27 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 22 Apr 2013 15:27:54 +0000 (15:27 +0000)
2013-04-22  Paolo Carlini  <paolo.carlini@oracle.com>

* include/std/type_traits (is_signed): Simplify.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
Adjust dg-error line numbers.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.
* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r198144

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/type_traits
libstdc++-v3/testsuite/20_util/declval/requirements/1_neg.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc

index ff956355d2e4127aa741478a3cd4a9b622859ae0..10313636b822132d2f0bfd6bc1de4e57e8bd03e5 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/std/type_traits (is_signed): Simplify.
+       * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
+       Adjust dg-error line numbers.
+       * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
+       Likewise.
+       * testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
+
 2013-04-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
        N3669
index 5bff0ab59591b7607974764959f1c665849ece51..79a9b6ae6903d1ac278c40d6045487972b9a09de 100644 (file)
@@ -538,18 +538,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { };
 
   template<typename _Tp,
-          bool = is_integral<_Tp>::value,
-          bool = is_floating_point<_Tp>::value>
+          bool = is_arithmetic<_Tp>::value>
     struct __is_signed_helper
     : public false_type { };
 
   template<typename _Tp>
-    struct __is_signed_helper<_Tp, false, true>
-    : public true_type { };
-
-  template<typename _Tp>
-    struct __is_signed_helper<_Tp, true, false>
-    : public integral_constant<bool, static_cast<bool>(_Tp(-1) < _Tp(0))>
+    struct __is_signed_helper<_Tp, true>
+    : public integral_constant<bool, _Tp(-1) < _Tp(0)>
     { };
 
   /// is_signed
index 348964aa78294a29ddec46f71ba38db19f910c2f..02347d1685e04d0552c795043f568325a1009042 100644 (file)
@@ -19,7 +19,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 1857 }
+// { dg-error "static assertion failed" "" { target *-*-* } 1852 }
 
 #include <utility>
 
index 7da7d1d4fef9749a0e26a9352f12a022e870931b..b2d5d770e63a767a17a26dd4244de22fe0e50e19 100644 (file)
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1599 }
-// { dg-error "declaration of" "" { target *-*-* } 1563 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1594 }
+// { dg-error "declaration of" "" { target *-*-* } 1558 }
index c769aa9a54c767a1d6567651b2fd9e7099d8f812..8980fe1ba8f1ba51e6c3c8393f141c40b50f013c 100644 (file)
@@ -48,5 +48,5 @@ void test01()
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1517 }
-// { dg-error "declaration of" "" { target *-*-* } 1481 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1512 }
+// { dg-error "declaration of" "" { target *-*-* } 1476 }