Subject: Re: [boost] [Boost.Math] Re: [Monotone-debian] Bug#653764: FTBFS with Boost 1.48: lgamma_small.hpp:483:38: error: expected primary-expression before 'do'
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-01-02 04:22:48
>> I'm not in a position to verify this for myself for another week, but
>> I have a horrible feeling I know what's wrong: Monotone defines
>> several one-character macros for its own use, and L() is one of them.
>> It looks like Boost is using L() for its own purposes and expecting it
>> not to be a macro.
>Zack, you are absolutely right. The lgamma_small header has a templated
>class method using "L" as one of the templates:
>template <class T, class Policy, class L>
>T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<0>&, const Policy&
>pol, const L&)
>The compile error at line 483 is at a call to L():
> result = log(gamma_imp(z, pol, L()));
This isn't new to 1.48: the code has used "L" as a template param since at
>> I'd argue that Boost headers should take care to defend themselves
>> from the possibility of such macros, but fixing that in Boost might be
>> an enormous amount of work, and in any case, 1.48 is already out
>Boost.Math developers: What is the right thing to do here? More
>descriptive class template parameters?
That's what I'll use as a fix in this case, in general though, we can only
fix "known issues" given that any symbol can be poisoned in the preprocessor
Thanks for the heads up, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk