[webkit-reviews] review granted: [Bug 181160] REGRESSION(r225769): Build error with constexpr std::max // std::min in libdstdc++4 : [Attachment 330200] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 26 21:16:24 PST 2017


Myles C. Maxfield <mmaxfield at apple.com> has granted Carlos Alberto Lopez Perez
<clopez at igalia.com>'s request for review:
Bug 181160: REGRESSION(r225769): Build error with constexpr std::max //
std::min in libdstdc++4
https://bugs.webkit.org/show_bug.cgi?id=181160

Attachment 330200: Patch

https://bugs.webkit.org/attachment.cgi?id=330200&action=review




--- Comment #15 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 330200
  --> https://bugs.webkit.org/attachment.cgi?id=330200
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330200&action=review

> Source/WTF/wtf/StdLibExtras.h:470
> +template <class T>
> +inline constexpr const T& min(const T& a, const T& b)
> +{
> +    return std::min(a, b);
> +}
> +
> +template <class T>
> +inline constexpr const T& max(const T& a, const T& b)
> +{
> +    return std::max(a, b);
> +}

If the new rule will be "don't use std::min(), better to use WTF::min()" can we
add a style check or commit check or something to enforce it?


More information about the webkit-reviews mailing list