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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [ctor3.C] - Rev 693

Compare with Previous | Blame | View Log

struct A {};
struct B;

template <class TP> struct X: virtual A {
  template <class TP2> X(TP2* ptr) {}
  template <class TP2> X(const X<TP2>) {}
};

struct Y : X<B> { 
  Y(A* a) : X<B>(a) {}
};

void func1(X<B>);

void func2() {
  A a;
  Y y(&a);
  func1(X<A>(&a));
}

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.