
16 Nov
2012
16 Nov
'12
9:02 a.m.
On Fri, Nov 16, 2012 at 12:52 PM, Antony Polukhin <antoshkka@gmail.com> wrote:
2012/11/16 Andrey Semashev <andrey.semashev@gmail.com>:
As long as iterator_range uses the begin()/end() protocol and string_ref has the corresponding member functions it should work without any special constructors/operators, shouldn't it?
Yes, but constructing string_ref from iterator_range requires additional constructor.
string_ref could probably use the same protocol with the restriction for iterator type being a pointer. Random access is not enough because a contiguous array of characters is needed.