mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-25 18:55:48 +00:00
0a0e0afaa0
The static asserts in span<T, N>::front() and span<T, N>::back() are incorrect as they may be triggered from valid code due to evaluation of a never taken branch: span<int, 0> foo; if (!foo.empty()) { auto x = foo.front(); } The problem is that the branch is always evaluated by the compiler, creating invalid compile errors for span<T, 0>. Thanks to Michael Schellenberger Costa for the patch. Differential Revision: https://reviews.llvm.org/D71995