Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / udlit-operator-neg.C
blob49761ca1631a0e590d6ea9a331c1bf7cb6d0f1b7
1 // { dg-do compile { target c++11 } }
3 //  Can't have *both* literal operator template and raw literal operator.
5 int
6 operator ""_abc(const char*)
7   {
8     return 42;
9   }
11 template<char...>
12   int
13   operator ""_abc() // { dg-error "literal operator template|conflicts with raw literal operator" }
14   {
15     return 13;
16   }
18 template<char...>
19   int
20   operator ""_def()
21   {
22     return 12;
23   }
25 int
26 operator ""_def(const char*) // { dg-error "raw literal operator|conflicts with literal operator template" }
27   {
28     return 43;
29   }
31 int
32 operator ""_ghi(long double)
33   {
34     return 42;
35   }
37 template<char...>
38   int
39   operator ""_ghi() // OK
40   {
41     return 13;
42   }