PR libstdc++/91711 fix failing test

PR libstdc++/91711
	* testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
	0ul being a valid null pointer constant.

From-SVN: r275563
This commit is contained in:
Jonathan Wakely 2019-09-10 08:35:40 +01:00 committed by Jonathan Wakely
parent 391d5d2e30
commit e2c11cd16b
2 changed files with 5 additions and 1 deletions

View 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)

View 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 }