[all-commits] [llvm/llvm-project] cc1d02: [libc++] No longer support ranges::begin(x) when x...
Quuxplusone via All-commits
all-commits at lists.llvm.org
Fri Feb 4 13:12:22 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cc1d02ba2d177e0d31561934337f5412167f6954
https://github.com/llvm/llvm-project/commit/cc1d02ba2d177e0d31561934337f5412167f6954
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
More information about the All-commits
mailing list