PR libstdc++/91711 fix failing test
authorJonathan Wakely <jwakely@redhat.com>
Tue, 10 Sep 2019 07:35:40 +0000 (08:35 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 10 Sep 2019 07:35:40 +0000 (08:35 +0100)
PR libstdc++/91711
* testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
0ul being a valid null pointer constant.

From-SVN: r275563

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/23_containers/span/get_neg.cc

index 6be181413ff54e6340ec49f1d051a30d392b33cf..7bb093de36639489f7768ad213f4fc6628385372 100644 (file)
@@ -1,5 +1,9 @@
 2019-09-10  Jonathan Wakely  <jwakely@redhat.com>
 
+       PR libstdc++/91711
+       * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
+       0ul being a valid null pointer constant.
+
        * include/std/type_traits (__remove_cv_t): New alias template.
        (is_void, is_integral, is_floating_point, is_pointer)
        (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
index 37d188ed07375f919d0d9d28587083bfdfb530c1..cd54716b105b5ec746fe8ae8b5025d174d1f0917 100644 (file)
@@ -24,7 +24,7 @@
 int
 main()
 {
-  std::span<int, std::dynamic_extent> myspan((int*)nullptr, 0ul);
+  std::span<int, std::dynamic_extent> myspan((int*)nullptr, (std::size_t)0);
   std::get<0>(myspan); // { dg-error "here" }
 }
 // { dg-error "static assertion failed" "" { target *-*-* } 0 }