|
Boost Users : |
Subject: Re: [Boost-users] [heap] Mix use of size_t and size_type
From: Ben Pope (benpope81_at_[hidden])
Date: 2015-03-12 06:05:04
On Thursday, March 12, 2015 05:52 PM, Paul A. Bristow wrote:
>> -----Original Message-----
>> From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Ben Pope
>> Sent: 12 March 2015 01:56
>> To: boost-users_at_[hidden]
>> Subject: Re: [Boost-users] [heap] Mix use of size_t and size_type
>>
>> On Thursday, March 12, 2015 07:06 AM, Gavin Lambert wrote:
>>> If you're referring to the parentheses around std::min itself, that's
>>> a standard defense against #define min().
>>
>> Thanks, never seen that used before.
>
> This is really quite important to avoid difficult-to-diagnose trouble when using Windows, whose code
> often makes a daft #define for min.
I haven't worked with Windows headers for a while, but I always ensured
that NOMINMAX or whatever it was, was defined. Of course, that's not
entirely useful if you're writing a library.
Ben
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net