[llvm-bugs] [Bug 34865] Clang doesn't require references to be listed in lambda capture
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 30 16:56:41 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34865
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
CC| |richard-llvm at metafoo.co.uk
--- Comment #3 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Clang is correct. Only odr-used variables need to be captured. Naming a
reference initialized by a constant expression does not constitute an odr-use.
See
http://wiki.edg.com/pub/Wg21albuquerque/CoreWorkingGroup/cwg_defects.html#1472
which introduced the "references initialized by constant expressions don't need
to be captured" rule.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171030/40ec97a6/attachment.html>
More information about the llvm-bugs
mailing list