|
Boost : |
Subject: Re: [boost] Heads up - string_ref landing
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-11-16 04:02:57
On Fri, Nov 16, 2012 at 12:52 PM, Antony Polukhin <antoshkka_at_[hidden]> wrote:
> 2012/11/16 Andrey Semashev <andrey.semashev_at_[hidden]>:
>>
>> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk