[LLVMdev] [RFC] C++11: beware unnecessary copies with auto

Duncan P. N. Exon Smith dexonsmith at apple.com
Sun Mar 2 09:03:24 PST 2014


It’s easy to copy unintentionally when using ‘auto’, particularly inside
range-based for loops.  My experience is that defaulting to const& makes
code easier to get right (and easier to read).

Anyone see an issue with the attached patch to the coding standards?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: beware-copies-with-auto.patch
Type: application/octet-stream
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140302/e87d7f44/attachment.obj>


More information about the llvm-dev mailing list