I guess when I read the impl I think to myself: What this is missing is a _length member. But then it just becomes boost::string_view. What value added is there to this impl except that it is smaller than boost::string_view due to lacking a _length member? bien Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows From: Seth via Boostmailto:boost@lists.boost.org Sent: Friday, May 13, 2022 6:35 AM To: Boost Listmailto:boost@lists.boost.org Cc: Sethmailto:bugs@sehe.nl Subject: Re: [boost] cstring_view
I don’t see how this is supposed to maintain the invariant ( null temination) w/o it’s own storage.
I had similar concerns, but then I looked at the code, and ... you know, it answers the question.
Consider: cstring_view sv; // is sv-data() pointing to a null-terminated string? If so, where did it come from?
The appriopriate static character literal.
cstring_view sv1(“abcdefg”)’ sv1.substring(3, 2); // what’s the value of strlen(sv.data) here? How can it be 2?
Length-constrained substring returns string_view. Seth _______________________________________________ Unsubscribe & other changes: https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.boost...