| 1 |
// PR c++/85864 |
| 2 |
// { dg-do compile { target c++14 } } |
| 3 |
// { dg-options -w } |
| 4 |
|
| 5 |
template<class T, T... S> struct String_template {}; |
| 6 |
|
| 7 |
template<class C, C... S> |
| 8 |
constexpr String_template<C, S...> operator""_template() { |
| 9 |
return String_template<C, S...> {}; |
| 10 |
} |
| 11 |
|
| 12 |
template<class prefix = decltype("0x"_template), class T> |
| 13 |
int hex(T v) { return 1; } |
| 14 |
|
| 15 |
template<int v> |
| 16 |
void tt2() { |
| 17 |
// auto h2 = hex<decltype("0x"_template)>(1); |
| 18 |
auto h = hex(2); |
| 19 |
} |
| 20 |
|
| 21 |
int main() { |
| 22 |
// auto h = hex(2); |
| 23 |
// return h; |
| 24 |
} |