OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [udlit-friend.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
 
3
long double
4
operator"" _Hertz(long double);
5
 
6
class Foo
7
{
8
public:
9
  Foo() { }
10
 
11
  friend Foo operator"" _Bar(char);
12
 
13
  friend long double
14
  operator"" _Hertz(long double omega)
15
  { return omega / 6.28318530717958648; }
16
};
17
 
18
Foo
19
operator"" _Bar(char)
20
{ return Foo(); }
21
 
22
Foo f1 = operator"" _Bar('x');
23
 
24
Foo f2 = 'x'_Bar;
25
 
26
long double fm1 = operator"" _Hertz(552.92L);
27
 
28
long double fm2 = 552.92_Hertz;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.