[PATCH] D26332: Add a user-defined literal for StringRef

Malcolm Parsons via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 05:33:04 PST 2016


malcolm.parsons added a comment.

The LLVM coding standards don't mention UDL.

The Google C++ Style Guide says
Pro: User-defined literals are a very concise notation for creating objects of user-defined types.
Con: User-defined literals allow the creation of new syntactic forms that are unfamiliar even to experienced C++ programmers.
Decision: Do not overload operator"", i.e. do not introduce user-defined literals

http://open-std.org/JTC1/SC22/WG21/docs/papers/2016/p0403r0.html proposes a UDL for std::string_view.

I think the pros outweigh the cons.


https://reviews.llvm.org/D26332





More information about the llvm-commits mailing list