
31 Dec
2012
31 Dec
'12
11:17 a.m.
On 31/12/12 00:33, Marshall Clow wrote:
On Dec 30, 2012, at 1:37 AM, Mathias Gaunard <mathias.gaunard@ens-lyon.org> wrote:
On 29/12/12 15:33, Daniel James wrote:
Easy conversion to std::basic_string. There's a C++11 explicit string operator, but that isn't much good for portable code. Something like a 'string' or 'to_string' member would do the trick.
Why not make string_ref implicitly convertible when in C++03?
Because it's an expensive conversion.
But making it implicitly convertible is the closest thing there is to explicitly convertible in C++11. It seems much cleaner than polluting the interface.