[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 20 05:49:31 PDT 2022
hokein added a comment.
Hi, this patch seems to break the following code which was previously compiled:
#include <type_traits>
#include <algorithm>
#include <numeric>
template <typename It, typename MapFn>
auto MapJoin(It first, It last, MapFn map_fn) {
return std::accumulate(
first, last, map_fn(*first),
[=](typename std::result_of<MapFn(decltype(*first))>::type result) { }); // a new diagnostic: error: captured variable 'first' cannot appear here
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123909/new/
https://reviews.llvm.org/D123909
More information about the cfe-commits
mailing list