[libc++] Consistently unparenthesize `numeric_limits<T>::max`. NFCI.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Fri, 27 Nov 2020 19:13:05 +0000 (14:13 -0500)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Fri, 27 Nov 2020 22:27:36 +0000 (17:27 -0500)
commit03ee46127621934c030d37f50aaefdef6bf9d4b0
tree3492abc0614b967d5603ae57b15585f5a1f459d8
parent979bcbd3a6f7ea784f2098ad4cf613fbd6b09e38
[libc++] Consistently unparenthesize `numeric_limits<T>::max`. NFCI.

I think people were sometimes parenthesizing `(foo::max)()` out of
misplaced concern that an unparenthesized `foo::max()` would trip up
Windows' `max(a,b)` macro. However, this is not the case: `max(a,b)`
should be tripped up only by an unparenthesized call to `foo::max(a,b)`,
and in fact we already do `_VSTD::max(a,b)` all over the place anyway
without any guards.

However, in order to do it without guards, we must also
wrap the header in _LIBCPP_PUSH_MACROS, which <span> was not.

Differential Revision: https://reviews.llvm.org/D92240
libcxx/include/charconv
libcxx/include/span