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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// PR c++/39413
// We don't need to instantiate Wrapper<int> to check the
// foo(const Thingy&) overload.

template <class T> struct Incomplete;

template <typename T> class Wrapper
{
  Incomplete<T> i;
};

template <typename T> struct Thingy
{
  Thingy();
  Thingy(const Wrapper<T>& v);

  template <typename X> void foo(const Thingy<X>&);
  void foo(const Thingy&);
};

int main()
{
    Thingy<int> ap1;
    Thingy<float> bp1;

    ap1.foo(bp1);
}

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.