https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69782

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
FWIW, while C++ doesn't allow programs to define min and max as macros, lots of
C code does it.  When that code happens to be in a header, including that
header in a C++ program causes all kinds of grief.  Sometimes, fixing the
header is easy.  Other times, for instance when the header is a system one, it
can be less than trivial.  A fairly easy way to avoid having to deal with the
problem in libstdc++ is to enclose every call to min and max in public
libstdc++ headers in parentheses: z = (min)(x, y).

Reply via email to