Re: C++17's string_view (was Re: Making use of move semantics?)

2017-06-13 Thread Jonathan Wakely
On 13 June 2017 at 08:31, Murray Cumming wrote: > > So, I think: > 1. We would use std::string_view everywhere if all the C functions took > a length instead of assuming null-termination. That's not going to > happen. > > 2. Overriding all methods to take either a const char* or a std::string >

Re: Making use of move semantics?

2017-06-13 Thread Murray Cumming
On Sun, 2017-05-21 at 15:03 +0100, Daniel Boles wrote: > On 21 May 2017 at 14:29, Murray Cumming wrote: > > We've already used move/r-value-references in several places, but > > not > > for string arguments. I assume that std::string's own move operations give us enough

C++17's string_view (was Re: Making use of move semantics?)

2017-06-13 Thread Murray Cumming
On Sun, 2017-05-21 at 15:03 +0100, Daniel Boles wrote: [snip] > > I guess we might start taking std::string_view with C++17 instead > > of > > std::string and this might largely take care of this. > > > I don't see how string_view would make any difference to whether or > not we end up copying