[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 11:16:54 PST 2022


hubert.reinterpretcast added a comment.

In D139586#3987252 <https://reviews.llvm.org/D139586#3987252>, @royjacobson wrote:

> The (non-wording) paper makes a pretty convincing case to just apply this retroactively to any C++11 code (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2644r1.pdf). I think we should apply this retroactively, maybe add a pedantic warning when we do a lifetime extension on code before C++23.

Just noting that the committee did not vote this in as a Defect Report, but I mostly agree that people should code for the new behaviour and that the old behaviour is unlikely to be relied on. I suspect this should be highlighted as technically a breaking change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139586/new/

https://reviews.llvm.org/D139586



More information about the cfe-commits mailing list