Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-08-13 06:34:34


On Tue, 13 Aug 2002 11:58:50 +0100, "John Maddock"
<john_maddock_at_[hidden]> wrote:

>Sorry for the delay in getting back to you on this...
>

No problem :-)

>It looks to me as if the problem is with forward declarations rather than
>default template argument as such, maybe we should just use BOOST_MSVC
><=1300 for this if it's very compiler specific (I stand to be corrected of
>course)....

Well, for now I have a local macro in dynamic_bitset.hpp that I called
BOOST_WORKAROUND_REPEAT_DEFAULT_TEMPLATE_ARGUMENTS.

#ifdef BOOST_MSVC
// in certain situations VC++ requires a redefinition of
// default template arguments, in contrast with 14.1/12
//
# define BOOST_WORKAROUND_REPEAT_DEFAULT_TEMPLATE_ARGUMENTS // macro
local to this file
#endif

#ifdef BOOST_WORKAROUND_REPEAT_DEFAULT_TEMPLATE_ARGUMENTS
 template <typename Block = unsigned long,
           typename Allocator = std::allocator<Block> >
#else
 template <typename Block, typename Allocator>
#endif

class dynamic_bitset : ... { ... };

I could test BOOST_MSVC directly but the macro better documents the
intent and is a suitable placeholder if any other compiler has the
same bug and/or if new versions of VC++ will correct it.

Genny.


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