[wasm] Avoid reporting of unrelated compiler errors
It happens frequently that unrelated compiler errors lead to the instantiation of {read_leb_tail} with an invalid {byte_index}, which again triggers compiler errors. This change fixes this, such that illegal instantiation just triggers a static_assert and nothing more. This helps to spot the actual error. Drive-by: Mark {Min} and {Max} constexpr, such that they can produce constexpr results. Note that the result will only be constexpr if both arguments are constexpr. R=ahaas@chromium.org Change-Id: I35d6865a7f569d72ace0debb045ac615cfd87d92 Reviewed-on: https://chromium-review.googlesource.com/518005Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#45558}
Showing
Please
register
or
sign in
to comment