
15 Aug
2011
15 Aug
'11
4:44 p.m.
On Thu, Aug 11, 2011 at 10:45 AM, Yakov Galka <ybungalobill@gmail.com> wrote:
class str_ref : public iterator_range<const char*> { ... };
Convertible from both, string literals and std::strings, and provide only one overload that accepts it everywhere.
Doesn't iterator_range treat literals as arrays by default? The str_ref idea is great, but IMO iterator_range isn't suitable for it. Also, doesn't iterator_range require memory allocations itself? Olaf