[libcxx-commits] [libcxx] f54e7b4 - [libc++] Remove unnecessary typenames from std/numerics/c.math/abs.pass.cpp

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 14 07:04:59 PST 2020


Author: Louis Dionne
Date: 2020-02-14T16:04:40+01:00
New Revision: f54e7b4e3a131f74006682387469bda0a2377bbf

URL: https://github.com/llvm/llvm-project/commit/f54e7b4e3a131f74006682387469bda0a2377bbf
DIFF: https://github.com/llvm/llvm-project/commit/f54e7b4e3a131f74006682387469bda0a2377bbf.diff

LOG: [libc++] Remove unnecessary typenames from std/numerics/c.math/abs.pass.cpp

There are some unnecessary typenames in std/numerics/c.math/abs.pass.cpp;
e.g. they're not in a dependent context.

Patch by Bryce Adelstein Lelbach

Differential Revision: https://reviews.llvm.org/D72106

Added: 
    

Modified: 
    libcxx/test/std/numerics/c.math/abs.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/numerics/c.math/abs.pass.cpp b/libcxx/test/std/numerics/c.math/abs.pass.cpp
index 3993dd34318a..03aae465c257 100644
--- a/libcxx/test/std/numerics/c.math/abs.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/abs.pass.cpp
@@ -47,7 +47,7 @@ int main(int, char**)
 {
     // On some systems char is unsigned.
     // If that is the case, we should just test signed char twice.
-    typedef typename std::conditional<
+    typedef std::conditional<
         std::is_signed<char>::value, char, signed char
     >::type SignedChar;
 
@@ -63,10 +63,10 @@ int main(int, char**)
 
     // Here there is no guarantee that int is larger than int8_t so we
     // use a helper type trait to conditional test against int.
-    test_abs<std::int8_t, typename correct_size_int<std::int8_t>::type>();
-    test_abs<std::int16_t, typename correct_size_int<std::int16_t>::type>();
-    test_abs<std::int32_t, typename correct_size_int<std::int32_t>::type>();
-    test_abs<std::int64_t, typename correct_size_int<std::int64_t>::type>();
+    test_abs<std::int8_t, correct_size_int<std::int8_t>::type>();
+    test_abs<std::int16_t, correct_size_int<std::int16_t>::type>();
+    test_abs<std::int32_t, correct_size_int<std::int32_t>::type>();
+    test_abs<std::int64_t, correct_size_int<std::int64_t>::type>();
 
     test_abs<long double, long double>();
     test_abs<double, double>();


        


More information about the libcxx-commits mailing list