www.digitalmars.com         C & C++   DMDScript  

c++.beta - Error: no type for argument

reply Christof Meerwald <cmeerw web.de> writes:
template<class C>
struct D
{
  typedef C E;
};

template<class C, class T = typename D<C>::E>
class B
{ };

template<class T = B<char> >
class A
{ };


int main()
{
  A<> a;
  // Error: no type for argument 'C'

  return 0;
}


bye, Christof

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

...and what have you contributed to the Net?
Jun 27 2003
parent Christof Meerwald <cmeerw web.de> writes:
On Fri, 27 Jun 2003 17:27:20 +0000 (UTC), Christof Meerwald wrote:
 template<class C>
 struct D
 {
   typedef C E;
 };

 template<class C, class T = typename D<C>::E>
 class B
 { };

 template<class T = B<char> >
 class A
 { };


 int main()
 {
   A<> a;
   // Error: no type for argument 'C'

   return 0;
 }

BTW (haven't mentioned it when I posted the bug report), this on is from Boost's tokenizer library. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Oct 05 2003