]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fixed failing dg-error in random/pr60037-neg.cc tests.
authorTomasz Kamiński <tkaminsk@redhat.com>
Wed, 17 Dec 2025 09:32:54 +0000 (10:32 +0100)
committerTomasz Kamiński <tkaminsk@redhat.com>
Wed, 17 Dec 2025 09:42:24 +0000 (10:42 +0100)
libstdc++-v3/ChangeLog:

* include/bits/random.tcc (generate_canonical): Update
error message to match pre-existing one in random.h.
* testsuite/26_numerics/random/pr60037-neg.cc: Updated
line for error message.

libstdc++-v3/include/bits/random.tcc
libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc

index e102e99eeb226470ee1e608ed99a1e3673ed59ad..3c5288c2eab8eabba7f0ecce003e99d219316d3f 100644 (file)
@@ -3651,7 +3651,7 @@ namespace __detail
     generate_canonical(_Urbg& __urng)
     {
       static_assert(__is_rand_dist_float_v<_RealT>,
-       "template argument must be floating point");
+       "template argument must be a floating point type");
       static_assert(__digits != 0 && _Urbg::max() > _Urbg::min(),
        "random samples with 0 bits are not meaningful");
       static_assert(std::numeric_limits<_RealT>::radix == 2,
index 4b36f75bba269125cbed2d4de5db80cc2bd852e2..06d659aae94f61854500d22f343b3f677840a440 100644 (file)
@@ -12,4 +12,4 @@ auto x = std::generate_canonical<std::size_t,
 
 // { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 271 }
 
-// { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 3480 }
+// { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 3653 }