Boost logo

Boost :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-09-17 06:11:16

The new MPL code is now breaking all of the type traits test programs with
C++ Builder 6.

First off there was a minor problem in integral_c.hpp caused by the recent
IBM C++ fixes (now fixed).

However there is a more serious problem in if.hpp caused by the line:


which if I've got it right expands to:

struct if_< void_,void_,void_ >
   template< typename T1,typename T2,typename T3 , typename T4=void_,
typename T5=void_ > //error here
   struct apply : if_< T1,T2,T3 > { };

namespace aux {
template< typename T1,typename T2,typename T3 >
struct template_arity< if_< T1,T2,T3 > >
{ static const int value = 3; };
struct template_arity< if_< void_,void_,void_ > >
{ static const int value = 3; };

The problem here is the nested template inside the if_ class, Builder 6
doesn't cope with default template parameters applied to template classes
that are themselves template class members. The fix is to remove the
default parameters and make sure that the apply template always gets passed
a full complement of parameters (it's only an implementation detail right?),
unfortunately you seem to be using this idiom quite a lot :-(

Hoping you can fix this...

John Maddock

Boost list run by bdawes at, gregod at, cpdaniel at, john at