
16 Nov
2012
16 Nov
'12
2:50 p.m.
Mathias Gaunard <mathias.gaunard <at> ens-lyon.org> writes:
If this is all you need, just use plain references.
void f(std::string const&); f("Olaf");
does make a useless copy.
OK. I thought you were talking about Olaf's desire to have implicit conversion from std::string. For this we use just f(char_range::literal("Olaf")); If it's possible to detect in compile time that our argument is a literal, I'm happy to make such a ctor implicit, but I doubt it's possible. Maxim