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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [explicit7.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
// [over.match.conv]: For direct-initialization, those explicit conversion
2
// functions that are not hidden within S and yield type T or a type that
3
// can be converted to type T with a qualification conversion (4.4) are
4
// also candidate functions.
5
 
6
// { dg-options -std=c++0x }
7
 
8
struct A { };
9
struct B: A { };
10
struct C {
11
  explicit operator B*();       // { dg-message "explicit" }
12
  explicit operator B&();  // { dg-message "explicit" }
13
};
14
 
15
C c;
16
A* ap (c);                      // { dg-error "" }
17
A& ar (c);                      // { dg-error "" }

powered by: WebSVN 2.1.0

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