New paper: N3609, string_view: A Non-owning Reference to a String, Revision 3 -- Jeffrey Yasskin
A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3609
Date: 2013-03-15
string_view: A Non-owning Reference to a String, Revision 3
by Jeffrey Yasskin
Excerpt:
Google, LLVM, and Bloomberg have independently implemented a string-reference type to encapsulate this kind of argument.
string_viewis implicitly constructible fromconst char*andstd::string. It provides most of theconstmember operations fromstd::stringto ease conversion. This paper follows Chromium and Bloomberg in extendingstring_viewtobasic_string_view<charT>, and further extends it to include atraitsparameter to matchbasic_string. We provide typedefs to parallel the 4basic_stringtypedefs.
