
24 Mar
2017
24 Mar
'17
9:44 a.m.
On 24 March 2017 at 07:57, Jonathan Müller via Boost
That's exactly what I said in my blog post. Function parameters are a special use case that require a different type, that type is std::string_view, for everything else a boost::string_ref that doesn't bind to rvalues could be repurposed.
That sounds like a pernickety solution to me. I'd find it easier to remember the risks than have to remember which type to use at any particular moment. Regardless, my main concern would be that string_view isn't compatible with the standard. Generally when I see a Boost version of a standard library object I expect it be reasonably close to a drop in replacement.