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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/47851
2
// { dg-options -std=c++0x }
3
 
4
struct Type {
5
  void display_type();
6
  void display_type() const { }
7
};
8
 
9
typedef Type const ConstType;
10
 
11
struct ConvertibleToType {
12
    operator Type&() { return *reinterpret_cast(this); }
13
};
14
 
15
int main ()
16
{
17
  // Both lines should call the const variant.
18
  (true ? ConvertibleToType() : ConstType()).display_type();
19
  decltype((true ? ConvertibleToType() : ConstType()))().display_type();
20
}

powered by: WebSVN 2.1.0

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