www.digitalmars.com         C & C++   DMDScript  

c++.beta - templates: constant initializer expected

template<int N>
struct A
{
  typedef int T;
};

template<int N>
void f(typename A<N>::T x)
{ }

int main()
{
  f<0>(0);
  // Error: constant initializer expected

  return 0;
}


Extracted from Boost's crc library.


bye, Christof

-- 
http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de

...and what have you contributed to the Net?
Oct 03 2003