aaron.ballman added a subscriber: MaskRay.
aaron.ballman added a comment.
In D123909#3461716 <https://reviews.llvm.org/D123909#3461716>, @hokein wrote:
> 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
> }
This looks like a true positive to me, at least for the moment (Core is still
trying to decide what to do about CWG2569 which may relax some restrictions in
this area).
@MaskRay -- your revert was incorrect, please un-revert.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123909/new/
https://reviews.llvm.org/D123909
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits