PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / udlit-friend.C
blob54d7b7a1f11130ea25f5e5358fc16bd35a909e90
1 // { dg-do compile { target c++11 } }
3 long double
4 operator"" _Hertz(long double);
6 class Foo
8 public:
9   Foo() { }
11   friend Foo operator"" _Bar(char);
13   friend long double
14   operator"" _Hertz(long double omega)
15   { return omega / 6.28318530717958648; }
18 Foo
19 operator"" _Bar(char)
20 { return Foo(); }
22 Foo f1 = operator"" _Bar('x');
24 Foo f2 = 'x'_Bar;
26 long double fm1 = operator"" _Hertz(552.92L);
28 long double fm2 = 552.92_Hertz;