www.digitalmars.com         C & C++   DMDScript  

c++.beta - class template partial specialization

reply Christof Meerwald <cmeerw web.de> writes:
I don't see a reason why this shouldn't work:

template<typename T1, typename T2> class A;

template<typename T>
class A<int, int(T)>
{ };

template<typename T>
class A<int(T), int>
// Error: identifier 'T' found in abstract declarator
{ };


int main()
{
  return 0;
}


Extracted from Boosts (1.30.0) function library.


bye, Christof

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

...and what have you contributed to the Net?
Apr 16 2003
parent Heinz Saathoff <hsaat bre.ipnet.de> writes:
Christof Meerwald schrieb...
 I don't see a reason why this shouldn't work:
 
 template<typename T1, typename T2> class A;
 
 template<typename T>
 class A<int, int(T)>
 { };

I'm not a template specialist an don't understand what int(T) should be here. Both int and T are types. What I know is a default type for T as in template<typename T> class A<int, T=int> {}; - Heinz
Apr 17 2003