Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2004-02-26 23:38:26

Eric Niebler wrote:
> Edward Diener wrote:
>> Yes, you definitely need to document this if the normal calls of
>> std::min(x,y) or std::max(x,y) no longer work properly when
>> including Boost header files for normal developers also. I do know
>> of the workaround for VC++ of (std::min)(x,y) and (std::max)(x,y)
>> which I have to use in my own code when windows.h is included. If
>> things have gotten more complicated than this when Boost headers are
>> included, programmers must definitely be told about or else one is
>> going to have many unhappy developers on one's hands. I would have
>> said to you that you need to write documentation on the changes
>> before committing the fixes, and not considering the importance of
>> doing so as an aftermath, even if only Boost developers are
>> involved, but since I am not a Boost developer myself (yet) I will
>> shut up further about it. <g>
> I know documentation is needed. I've asked twice if there is an
> appropriate place for such documentation. I'm still waiting.
> Also, I think you misunderstand the problem and the fix. The boost
> headers do not *introduce* any new problems with min/max. Any code
> that compiles without the boost headers should continue to compile
> fine with them.

Glad to hear that.

> And I haven't sprung this change on anyone. I've discussed it on this
> list for quite some time, and asked time and again about procedure. If
> you had a problem, you should have spoken up.

I have no issues with the changes you made. I am very glad you did it.

> I am happy to write the documentation. Just tell me where to put it.

I have no idea where to put it, but a change which affects the way Boost
developers use code which calls std::min and std::max certainly needs to be
documented somewhere where Boost developers will look. Else an unknowing
developer will once again use std::min and std::max and this will break when
windows.h with its #defines for min and max are included. My point was
simply that once you make the change to solve this problem, some Boost
developer who is unaware of your change will quite use std::min and std::max
in the old way again. Only some documentation somewhere, and I don't know
where in the documentation tree it should be but it certainly belongs near
the top since it can affect all Boost developers, needs to be produced so
that others are aware that your workaround is the way to use std::min and
std::max. Don't take my criticism for lack of documentation about the issue
for criticism of the work you have done to solve the problem. I am just
trying to avoid having this problem bite others again in the future.

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