gcc/testsuite/g++.dg/cpp0x/initlist14.C
raw| 1 | // Bug: We weren't doing the normal replacement of array with pointer |
| 2 | // for deduction in the context of a call because of the initializer list. |
| 3 | // { dg-do compile { target c++11 } } |
| 4 | |
| 5 | #include <initializer_list> |
| 6 | |
| 7 | struct string |
| 8 | { |
| 9 | string (const char *); |
| 10 | }; |
| 11 | |
| 12 | template <class T> |
| 13 | struct vector |
| 14 | { |
| 15 | template <class U> |
| 16 | vector (std::initializer_list<U>); |
| 17 | }; |
| 18 | |
| 19 | vector<string> v = { "a", "b", "c" }; |