libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/120931.cc
raw| 1 | // { dg-options "-std=gnu++98" } |
| 2 | // { dg-do compile { target c++98_only } } |
| 3 | // std::deque<character types>::resize() method fails with -std=c++98 |
| 4 | |
| 5 | #include <memory> |
| 6 | #include <testsuite_iterators.h> |
| 7 | |
| 8 | void |
| 9 | test_pr120931() |
| 10 | { |
| 11 | using __gnu_test::test_container; |
| 12 | using __gnu_test::forward_iterator_wrapper; |
| 13 | unsigned char c[1]; |
| 14 | test_container<unsigned char, forward_iterator_wrapper> f(c); |
| 15 | std::uninitialized_fill(f.begin(), f.end(), 0); |
| 16 | } |