libstdc++-v3/testsuite/26_numerics/random/piecewise_linear_distribution/cons/122062.cc
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | // PR libstdc++/122062 |
| 4 | // piecewise_linear_distribution(firstB, lastB, firstW) invokes comma operator |
| 5 | |
| 6 | #include <random> |
| 7 | #include <testsuite_iterators.h> |
| 8 | |
| 9 | void |
| 10 | test_pr122062() |
| 11 | { |
| 12 | double b[1]{}; |
| 13 | double w[1]{}; |
| 14 | __gnu_test::random_access_container<double> B(b), W(w); |
| 15 | std::piecewise_linear_distribution<double> p(B.begin(), B.end(), W.begin()); |
| 16 | } |