aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr86082.C
blob: 1d9411231314b6c856ec0b3d23260c22e3e7184a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do link } */
/* { dg-require-iconv "IBM1047" } */
/* { dg-options "-fexec-charset=IBM1047 -std=c++11" } */

/* When turning 123_test into an operator invocation the literal 123
   needs to be translated to the execution character set.  Failing to
   do so results in a link error since '1', '2', and '3' in the
   specialization will be translated as string literals.  */

template <char... p> void q();
template <> void q<'1','2','3'>() {}

template <char... p> void operator""_test() { q<p...> (); }

int
main ()
{
  123_test;
}