[PATCH] D26568: [ADT] Delete Twine constructors which accept StringRef rvalues (NFC)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 08:35:44 PST 2016


On Sun, Nov 13, 2016 at 8:00 PM Vedant Kumar <vsk at apple.com> wrote:

> vsk added a subscriber: jordan_rose.
> vsk added a comment.
>
> Hm, this doesn't seem workable. Deleting these constructors would make it
> harder to pass strings into functions.
>
> Maybe it would be better to try something like r286139, and just delete
> `Twine &operator=(T &&)` when T is a std::string or a StringRef.
> @jordan_rose wdyt?
>

Is there any reason Twine supports assignment of any kind? That doesn't
seem ideal/intentional, given its design... (but I know there are some
cases that use named Twines - so perhaps it's common enough we should
continue supporting it, though I'd be /really/ suspicious of such code,
it'd be easy to create dangling Twines).


>
>
> https://reviews.llvm.org/D26568
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/f3022831/attachment.html>


More information about the llvm-commits mailing list