PR c++/85864 - literal template and default template arg.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / udlit-char-template2.C
blob06c13261156e046532e548f4ce51c1130768c8a2
1 // PR c++/85864
2 // { dg-do compile { target c++14 } }
4 template<class T, T... S> struct String_template {};
6 template<class C, C... S>
7 constexpr String_template<C, S...> operator""_template() {
8     return String_template<C, S...> {};
11 template<class prefix = decltype("0x"_template), class T>
12 int hex(T v) { return 1; }
14 template<int v> 
15 void tt2() {
16   //    auto h2 = hex<decltype("0x"_template)>(1);
17     auto h = hex(2);
20 int main() {
21   //    auto h = hex(2);
22   //    return h;