From: Kevlin Henney (Kevlin.Henney_at_[hidden])
Date: 1999-08-31 12:12:58
Valentin Bonnard wrote:
> Greg Colvin wrote:
> Doesn't that break the ODR? Or am I confused again?
If MY_DEBUG is defined the same way in all headers, it's
fine. If not, _and_ you are using headers which use the
macro, then it breaks the ODR.
I leave the responsabillity to define debug_mode
consistently to the user.
So we're back where we started?
Yes, it's pretty easy to break the ODR by defining an
constant with external linkage with different values
in different TUes. At least, in this case, the bug is
with the definition of debug_mode, not with the macro.
I feel this to be an unrealistic and intrusive requirement for many
projects. It may be easy to satisfy for small, single developer
projects, but can introduce many problems for larger, existing projects
(problems of both a technical and a political nature). Debugging
features should be under the control of the developer, and not
It is one thing to say that it is easy to break ODR, and quite another
to offer people a facility that makes it even easier >:->
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk