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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [template3.C] - Rev 774

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

// Origin PR c++/47957
// { dg-do compile }

struct S
{
  int m;

  S()
    : m(0)
  {
  }
};

struct Base
{
  typedef S T;
};

template<class T>
struct Derived : public Base
{
  int
  foo()
  {
    T a; // This is Base::T, not the template parameter.
    return a.m;
  }
};

int
main()
{
  Derived<char> d;
  return d.foo();
}

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.