111
|
1 // { dg-do compile { target c++14 } }
|
|
2 // { dg-prune-output "note:" }
|
|
3
|
|
4 template<bool, typename _Tp = void>struct enable_if {};
|
|
5 template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; };
|
|
6
|
|
7
|
|
8 template<typename CharT, CharT... String>
|
|
9 typename enable_if<sizeof...(String) == 1, int>::type operator"" _script () { // { dg-error "no type named|in" }
|
|
10 return 1;
|
|
11 }
|
|
12
|
|
13 template<typename CharT, CharT... String>
|
|
14 typename enable_if<sizeof...(String) == 2, int>::type operator"" _script () { // { dg-error "no type named|in" }
|
|
15 return 2;
|
|
16 }
|
|
17
|
|
18 int a = "1"_script;
|
|
19 int b = "22"_script;
|
|
20 int c = "333"_script; // { dg-error "no matching function for call to"}
|