aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1y/udlit-char-template2.C
blob: 06c13261156e046532e548f4ce51c1130768c8a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/85864
// { dg-do compile { target c++14 } }

template<class T, T... S> struct String_template {};

template<class C, C... S>
constexpr String_template<C, S...> operator""_template() {
    return String_template<C, S...> {};
}

template<class prefix = decltype("0x"_template), class T>
int hex(T v) { return 1; }

template<int v> 
void tt2() {
  //    auto h2 = hex<decltype("0x"_template)>(1);
    auto h = hex(2);
}

int main() {
  //    auto h = hex(2);
  //    return h;
}