libstdc++: Fix some tests that fail in C++20 mode
The linear_congruential_engine negative tests fail with a different error in C++20 mode, because double is no longer an invalid type for NTTP. Adjust the expected errors. libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/linear_congruential_engine/requirements/non_uint_neg.cc: Adjust expected error for C++20 mode. * testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc: Likewise.
This commit is contained in:
parent
a694a02125
commit
91dd7954c4
2 changed files with 5 additions and 2 deletions
|
@ -20,10 +20,12 @@
|
|||
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-require-cstdint "" }
|
||||
// { dg-error "not a valid type" "" { target { ! c++20 } } 31 }
|
||||
// { dg-error "from 'int' to 'double'" "" { target c++20 } 31 }
|
||||
|
||||
// 26.4.3.1 class template linear_congruential_engine [rand.eng.lcong]
|
||||
// 26.4.2.2 Concept RandomNumberEngine [rand.concept.eng]
|
||||
|
||||
#include <random>
|
||||
|
||||
std::linear_congruential_engine<double, 48271, 0, 2147483647> x; // { dg-error "not a valid type" }
|
||||
std::linear_congruential_engine<double, 48271, 0, 2147483647> x;
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
// { dg-do compile }
|
||||
// { dg-options "-D_GLIBCXX_CONCEPT_CHECKS" }
|
||||
// { dg-error "not a valid type" "" { target *-*-* } 29 }
|
||||
// { dg-error "not a valid type" "" { target { ! c++20 } } 30 }
|
||||
// { dg-error "from 'int' to 'double'" "" { target c++20 } 30 }
|
||||
|
||||
// 5.1.4.1 class template linear_congruential [tr.rand.eng.lcong]
|
||||
// 5.1.4.1 [4]
|
||||
|
|
Loading…
Add table
Reference in a new issue