[random] Compilation errors in linear_congruential.hpp because of min()/max()

Hi, I'm getting compilations errors against Boost trunk from inside linear_congruential.hpp:+89 on VS2010 because of min()/max() being used without safeguarding them against accidental macro substitution: assert(_x >= min()); assert(_x <= max()); if I replace this with assert(_x >= (min)()); assert(_x <= (max)()); the compiler errors go away. Regards Hartmut ------------------- Meet me at BoostCon http://boostcon.com

AMDG Hartmut Kaiser wrote:
I'm getting compilations errors against Boost trunk from inside linear_congruential.hpp:+89 on VS2010 because of min()/max() being used without safeguarding them against accidental macro substitution:
assert(_x >= min()); assert(_x <= max());
if I replace this with
assert(_x >= (min)()); assert(_x <= (max)());
the compiler errors go away.
My bad. Fixed in the trunk. In Christ, Steven Watanabe

Thanks Steven! Regards Hartmut ------------------- Meet me at BoostCon http://boostcon.com
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost- bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: Monday, November 16, 2009 5:39 PM To: boost@lists.boost.org Subject: Re: [boost] [random] Compilation errors in linear_congruential.hpp because of min()/max()
AMDG
Hartmut Kaiser wrote:
I'm getting compilations errors against Boost trunk from inside linear_congruential.hpp:+89 on VS2010 because of min()/max() being used without safeguarding them against accidental macro substitution:
assert(_x >= min()); assert(_x <= max());
if I replace this with
assert(_x >= (min)()); assert(_x <= (max)());
the compiler errors go away.
My bad. Fixed in the trunk.
In Christ, Steven Watanabe
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Hartmut Kaiser
-
Steven Watanabe