gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C
raw| 1 | // PR c++/59435 |
| 2 | // { dg-require-effective-target c++11 } |
| 3 | |
| 4 | template <typename... E> |
| 5 | struct T |
| 6 | { |
| 7 | T(unsigned int i = sizeof...(E)){} // does not compile |
| 8 | |
| 9 | static constexpr unsigned int U = sizeof...(E); |
| 10 | T(unsigned int j, unsigned int i = U){} // compile |
| 11 | }; |
| 12 | |
| 13 | template <typename... T> |
| 14 | void test(int i = sizeof...(T)) // compile |
| 15 | {} |