Boost logo

Boost :

Subject: Re: [boost] Requirements: min and max macros
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-02-05 17:46:24


On 02/05/17 20:15, Vinnie Falco wrote:
> From
> http://www.boost.org/development/requirements.html#Naming
>
> "Make sure your code compiles in the presence of the min() and max()
> macros. Some platform headers define min() and max()macros which cause
> some common C++ constructs to fail to compile. Some simple tricks can
> protect your code from inappropriate macro substitution:..."
>
> There is one case not addressed. What to do with this:
>
> std::min<std::size_t>(a, b);
>
> ?

min and max are function-like macros. The code above is not affected by
those.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk