aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorXiaoyang Liu <siujoeng.lau@gmail.com>2024-04-26 11:00:47 -0400
committerGitHub <noreply@github.com>2024-04-26 11:00:47 -0400
commite74be35c1abedf87cfaa141284cb730911211ee1 (patch)
tree4735e8579db627738f89c2d68737aaa06c5978e4 /clang/lib/Frontend/InitPreprocessor.cpp
parent1728a56d0e66c9e64a2e62fa6c5508580ccd28a0 (diff)
downloadllvm-e74be35c1abedf87cfaa141284cb730911211ee1.zip
llvm-e74be35c1abedf87cfaa141284cb730911211ee1.tar.gz
llvm-e74be35c1abedf87cfaa141284cb730911211ee1.tar.bz2
[libc++][ranges] LWG3984: ranges::to's recursion branch may be ill-formed (#87964)
This pull request implements LWG3984: ranges::to's recursion branch may be ill-formed. In the current implementation, ranges::to's recursion branch pipes the range into a `views::transform(/* lambda */)`, which is a __range_adaptor_closure object. In libc++, the pipe operator of __range_adaptor_closure requires a viewable_range, so the following code won't compile, as the type of lvalue `r` doesn't model viewable_range: #include <ranges> #include <vector> #include <list> int main() { std::vector<std::vector<int>> v; auto r = std::views::all(std::move(v)); auto l = std::ranges::to<std::list<std::list<int>>>(r); } Co-authored-by: A. Jiang <de34@live.cn>
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions