
30 Dec
2012
30 Dec
'12
3:37 p.m.
On 30/12/12 13:11, Olaf van der Spek wrote:
On Sun, Dec 30, 2012 at 10: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?
And why not do the same in C++11?
Because that's not what the specification says. I suppose the reason is that a conversion to string is costly, and that you usually want to avoid it.