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] - Rev 705

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

// [over.match.conv]: For direct-initialization, those explicit conversion
// functions that are not hidden within S and yield type T or a type that
// can be converted to type T with a qualification conversion (4.4) are
// also candidate functions.

// { dg-options -std=c++0x }

struct A { };
struct B: A { };
struct C {
  explicit operator B*();       // { dg-message "explicit" }
  explicit operator B&();       // { dg-message "explicit" }
};

C c;
A* ap (c);                      // { dg-error "" }
A& ar (c);                      // { dg-error "" }

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

powered by: WebSVN 2.1.0

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