Debian Codegraph @

libstdc++-v3/testsuite/23_containers/vector/bool/capacity/114758.cc

raw
1 // { dg-options "-O3 -Werror=stringop-overread -fno-assume-sane-operators-new-delete" }
2 // { dg-do compile }
3
4 // Bug libstdc++/114758 The layout of a std::vector<bool> reports a warning
5
6 #include <vector>
7
8 void pr114758(std::vector<bool>& v)
9 {
10 v.resize(3);
11 v = std::vector<bool>(3, false);
12 }