aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/ThreadPool.cpp
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2020-02-14 14:31:15 +0100
committerLouis Dionne <ldionne@apple.com>2020-02-14 14:32:41 +0100
commit0a0e0afaa0249a07b5d1609c433e991c8d982a73 (patch)
tree8246aec51b1793193db98fefa0e0d074848c92bc /llvm/lib/Support/ThreadPool.cpp
parent84240e0db8ab85b56df11e6cee8fef5ac7ee8c33 (diff)
downloadllvm-0a0e0afaa0249a07b5d1609c433e991c8d982a73.zip
llvm-0a0e0afaa0249a07b5d1609c433e991c8d982a73.tar.gz
llvm-0a0e0afaa0249a07b5d1609c433e991c8d982a73.tar.bz2
[libc++] span: Fix incorrect static asserts
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
Diffstat (limited to 'llvm/lib/Support/ThreadPool.cpp')
0 files changed, 0 insertions, 0 deletions