comparison gcc/testsuite/g++.dg/cpp1y/udlit-char-template2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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 }