| 1 |
/* { dg-do link } */ |
| 2 |
/* { dg-require-iconv "IBM1047" } */ |
| 3 |
/* { dg-options "-fexec-charset=IBM1047 -std=c++11" } */ |
| 4 |
|
| 5 |
/* When turning 123_test into an operator invocation the literal 123 |
| 6 |
needs to be translated to the execution character set. Failing to |
| 7 |
do so results in a link error since '1', '2', and '3' in the |
| 8 |
specialization will be translated as string literals. */ |
| 9 |
|
| 10 |
template <char... p> void q(); |
| 11 |
template <> void q<'1','2','3'>() {} |
| 12 |
|
| 13 |
template <char... p> void operator""_test() { q<p...> (); } |
| 14 |
|
| 15 |
int |
| 16 |
main () |
| 17 |
{ |
| 18 |
123_test; |
| 19 |
} |