Template specialization within template definition: is this supported for all compilers or standard

Posted by cosmos on Stack Overflow See other posts from Stack Overflow or by cosmos
Published on 2010-05-19T10:51:39Z Indexed on 2010/05/19 11:00 UTC
Read the original article Hit count: 322

This compiled on VS 2008, but it seems like non-standard usage of templates.

template <class T>
class Foo
{
public:
  void bar(Foo<int> arg)
  {
    // do some stuff here
  }

  // more code ...
};

Is there an issue since the template specialization Foo<int> is contained within the definition of its own template class?

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates