Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-08-02 07:24:25


Hi everybody,

it seems that MSVC has problems with multiple default template
arguments for class templates. For instance it doesn't understand the
declaration in dynamic_bitset_fwd.hpp unless you re-write it in the
(non-equivalent, of course) form:

template <typename Block, typename Allocator = std::allocator<Block> >
class dynamic_bitset;

What about adding a new config macro, e.g.
BOOST_NO_MULTIPLE_DEFAULT_TEMPLATE_ARGUMENTS, that deals with this?

A test case for MSVC 6.0 SP5 is

 template <class A = int, class B = A>
  class Test {};

which results in an internal compiler error.
 

I'm not sure about the situations in which the problem reveals itself,
so maybe the name of the macro isn't even appropriate but, regardless
of the name, I think some macro is useful. Opinions?

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk