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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [template/] [spec10.C] - Rev 338

Compare with Previous | Blame | View Log

// { dg-do run }

// Origin: Lynn Akers <lakers@peachtree.com>

// PR c++/10940: Problem handling parameter list for static member
// that is a specialization of a member template of a template class.

template<int b>
class o
{
public:
  template<typename T> static void do_add(T* p, T v);
};

template<>
template<typename T>
inline void o<32>::do_add(T* p, T v)
{
  *p += v;
}

int main()
{
  int a = 0x1000;
  o<32>().do_add<int>(&a, 0x2000);
  return (a != 0x3000);
}

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.