
14 Aug
2011
14 Aug
'11
10:45 p.m.
On Thu, Aug 11, 2011 at 4:45 AM, Yakov Galka <ybungalobill@gmail.com> wrote:
Another option is to define
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.
Just an idea. -- Yakov
Hi Yakov, Thanks for your suggestion! In the end though, I decided to add separate std::string overloads. Since the interfaces involved are few and simple, it seemed better to overload in the most straightforward way, rather than add something fancier just to save a bit of typing on the implementation side. Thanks, -Gabe