[PATCH] D26332: Add a user-defined literal for StringRef
Malcolm Parsons via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 10:10:28 PST 2016
malcolm.parsons added a comment.
In https://reviews.llvm.org/D26332#604408, @zturner wrote:
> If the goal here is to achieve constexprness so it doesn't require a static initializer, how about reviving Mehdi's patch which make the const char * constructor explicit, and then adding a constexpr char array constructor?
A char array constructor cannot tell whether the array is a literal or not.
A UDL can only be called with a literal.
https://reviews.llvm.org/D26332
More information about the llvm-commits
mailing list