|
Boost : |
From: Edward Diener (eldiener_at_[hidden])
Date: 2019-12-17 13:50:05
On 12/17/2019 2:39 AM, Alexander Grund via Boost wrote:
>
>> You can eventually put in a common header included by all library XXX
>> headers:
>>
>> #if defined(XXX_SOMEMACRO)
>> #error the correct definition for XXX_SOMEMACRO is now
>> BOOST_XXX_SOMEMACRO. Please make the change in your source code.
>> #endif
>>
>> I understand that this may be annoying, but I think it is eventually
>> worth it.
>
>
> > So, to answer your question, you detect the old setting where the new
> > setting is not applied, and give a useful error (my preference) or
> > warning (Peter's preference).
>
>
> So you want to forbid using e.g. PHOENIX_LIMIT for everyone using
> Boost.Phoenix? What about in 2 releases after that change someone new
> comes in and uses the new Boost (the first he has ever used) together
> with some libPhoenix he wrote and (appropriately) uses PHOENIX_LIMIT as
> the same for his macros?
> So what is gained?
It is a macro. Macros do not go into libraries. The libPhoenix he wrote
has nothing in it regarding the name PHOENIX_LIMIT. If your hypothetical
programmer uses PHOENIX_LIMIT in his code he is told via the
preprocessor #error that he must use BOOST_PHOENIX_LIMIT instead.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk