Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Daniel James (dnljms_at_[hidden])
Date: 2012-11-27 06:48:15

On 27 November 2012 03:03, Yanchenko Maxim <maximyanchenko_at_[hidden]> wrote:
> 26.11.12, 20:54, "Daniel James" <dnljms_at_[hidden]>":
>> Shouldn't construction from an arbitrary range be explicit? Arbitrary
>> implicit conversions are problematic. To get implicit construction
>> from third party strings, I'd use some sort of explicit customisation
>> mechanism.
> Hi Daniel, I'm fully with you here. The construction of string_ref should be explicit (except maybe literals if we can detect them in compile time) as we're giving away pointers to something that is externally managed.

Sorry, I must have not been clear enough, since a few people seem to
have misunderstood me. I think that string_ref should be implicitly
convertible from appropriate strings, explicitly convertible from
other types. Implicit conversion from third party strings could be
supported by customisation.

Boost list run by bdawes at, gregod at, cpdaniel at, john at