gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C
raw| 1 | // PR c++/108195 |
| 2 | // { dg-do run { target c++11 } } |
| 3 | // { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 4 | |
| 5 | #include <vector> |
| 6 | |
| 7 | struct S |
| 8 | { |
| 9 | S(bool) {} |
| 10 | }; |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | std::vector<S> v = { true, false, true }; |
| 15 | if (v.size() != 3) |
| 16 | __builtin_abort (); |
| 17 | } |