]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/testsuite/26_numerics/random/pr60037-neg.cc
libstdc++: Fix undefined behaviour in random dist serialization (PR93205)
[gcc.git] / libstdc++-v3 / testsuite / 26_numerics / random / pr60037-neg.cc
1 // { dg-do compile { target c++11 } }
2
3 #include <random>
4
5 std::mt19937 urng;
6
7 std::__detail::_Adaptor<std::mt19937, unsigned long> aurng(urng);
8
9 auto x = std::generate_canonical<std::size_t,
10 std::numeric_limits<std::size_t>::digits>(urng);
11
12 // { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 156 }
13
14 // { dg-error "static assertion failed: template argument must be a floating point type" "" { target *-*-* } 3315 }
This page took 0.036227 seconds and 5 git commands to generate.