[base] Fix CHECK/DCHECK macros for enum types
The problem with enums is that neither is_integral, nor is_signed or is_unsigned is true for them. Thus, comparison with our CHECK/DCHECK macros always just uses the default comparison, which fails if the signedness of the underlying integer types does not match. This CL fixes this by considering the underlying integer type of an enum to choose the right comparison operator. R=ishell@chromium.org CC=ahaas@chromium.org Change-Id: I5ef56d1b86228e879f5866967ab7e709f1e97f0b Reviewed-on: https://chromium-review.googlesource.com/518123 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#45593}
Showing
Please
register
or
sign in
to comment