Boost logo

Boost :

Subject: Re: [boost] [preprocessor] badly formed constant expression on Sun
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-04-13 15:51:01

Paul Mensonides wrote
> On Tue, 03 Apr 2012 19:27:40 -0700, lcaminiti wrote:
>> Is (BOOST_PP_VALUE) / 1000000000UL not a valid constant expression on
>> Sun 64-bits machines?
> 32 vs. 64-bit shouldn't make a difference to the mechanism. I suppose it
> might matter if something was less than 32-bit.
>> I can't reproduce this error on my Sun C++ compiler installed on 32-bit
>> Ubuntu Linux... so maybe this is about the actual Sun machine and not
>> the Sun compiler... However, all Boost.Preprocessor tests pass on Sun...
>> Any suggestion?
>> Thanks a lot.
>> --Lorenzo
> I have no idea what the problem is (and I don't have access to the
> compiler/architecture to figure it out). What's BOOST_PP_VALUE defined
> as?

It's a bit different for me to be sure about what was going on but I think
the following caused the error:

            (3, (0,
# include BOOST_PP_ITERATE() // Iterate over function arity.

The issue goes away if I remove the PP_SUB from within the PARAMS_1
definition (that's how I worked around the issue, I iterate 2 to MAX and
then SUB 2 from within the iteration frame).

Is that expected or it's a bug in the Sun pp macro expansion? This issue
only happened on Sun...

Thanks a lot.

View this message in context:
Sent from the Boost - Dev mailing list archive at

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