[all-commits] [llvm/llvm-project] 9f9ea7: [libc++] No longer support ranges::begin(x) when x...
Quuxplusone via All-commits
all-commits at lists.llvm.org
Fri Feb 4 13:13:25 PST 2022
Branch: refs/heads/release/14.x
Home: https://github.com/llvm/llvm-project
Commit: 9f9ea707d0c6f2839a52a7045a35ea3356d851be
https://github.com/llvm/llvm-project/commit/9f9ea707d0c6f2839a52a7045a35ea3356d851be
Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
Date: 2022-02-04 (Fri, 04 Feb 2022)
Changed paths:
M libcxx/include/__ranges/access.h
R libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp
M libcxx/test/std/ranges/range.access/begin.pass.cpp
Log Message:
-----------
[libc++] No longer support ranges::begin(x) when x is an array of incomplete type.
var-const points out that `ranges::begin` is (non-normatively
but explicitly) always supposed to return a `std::input_or_output_iterator`,
and `Incomplete*` is not a `std::input_or_output_iterator` because it
has no `operator++`. Therefore, we should never return `Incomplete*`
from `ranges::begin(x)`, even when `x` is `Incomplete(&)[]`. Instead,
just SFINAE away.
Differential Revision: https://reviews.llvm.org/D118963
(cherry picked from commit cc1d02ba2d177e0d31561934337f5412167f6954)
More information about the All-commits
mailing list