Boost logo

Boost :

From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-12-22 09:52:38


On Thu, 22 Dec 2005 09:30:19 -0000, Frank Laub <frank.laub_at_[hidden]>
wrote:

>>
>> No, it won't. typename should be replaced by BOOST_DEDUCED_TYPENAME,
>> which expands to typename on compilers that require it, and nothing
>> where they reject it.
>
>
> Ya know, my first implementation used this macro, however I noticed other
> boost libs that did not use it, so I mistakenly thought it was
> deprecated.
> Silly me :)

I'm just trying rev4.5 and sadly that doesn't work! According to the
Boost config library this compiler version (5.6.4) and above support the
use of 'typename', hence BOOST_DEDUCED_TYPENAME expands to 'typename' and
so enum.cpp fails to compile for me :-(

I guess that the compiler does not support it in this special case of
temporaries?

If you wish to continue to persue this troublesome compiler, you can
create the temporary value as a local instead:

replace:
   test_parse(first.str(), BOOST_DEDUCED_TYPENAME T::optional(first));

with:
   BOOST_DEDUCED_TYPENAME T::optional Temp(first);
   test_parse(first.str(), Temp);

enum.cpp line 448 etc. This works with or without BOOST_DEDUCED_TYPENAME
for me. Sadly it's a bit inelegant.


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