Boost logo

Boost :

From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-12-21 05:53:10


I couldn't see how it was valid on other compilers, but I assumed that it
had compiled on at least one compiler before being uploaded.

There are similar problems in bitfield.hpp line 111 and 117 and base.hpp
lines 61 and 67.

I can't get enum.cpp (the test/example program) to compile for two reasons:

(i) The form for boost::function is the preferred syntax rather than the
portable, could it be changed to portable? test_optional_method becomes:
template <typename T, typename A>
void test_optional_method(
        A arg,
        typename T::optional expected,
        const char* method_name,
        boost::function1<typename T::optional, A> method
)

(ii) My compiler does not like the use of 'typename' in the body of
test_enum and test_bitfield, eg in test_enum
test_parse(first.str(), typename T::optional(first));
becomes:
test_parse(first.str(), T::optional(first));
I can't say which is the correct syntax or if the version without typename
works for other compilers.

On Wed, 21 Dec 2005 09:15:57 -0000, Yuval Ronen <ronen_yuval_at_[hidden]>
wrote:

> Frank Laub wrote:
>>> Is there a particular reason why this compiler complains about the
>>> conversion whereas the others are fine with it? Would you consider
>>> making
>>> this change to support this compiler?
>>
>> I'm happy to make a change that supports more compilers. Thanks for
>> trying
>> it out on Borland. I'll have an update soon.
>
> Actually, this is not about supporting more compilers - this about
> fixing a bug. Putting 'return false' there is a bug, plain and simple,
> and 'return optional()' is the right thing to do, whether we care about
> more compilers support or not...


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