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