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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [template12.C] - Rev 816

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// Templates can be defined outside of the namespace if the have been declared
// inside
namespace bar
{
  template <typename T>
  T const foo(T const &);
  template<> const int foo<int>(int const &);
}

template <typename T>
T const
bar::foo(T const &a)
{
  return a;
}

template<> const int bar::foo<int>(int const &){return 0;}

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.