|
Boost : |
Subject: Re: [boost] [string_ref] Feature requests
From: Olaf van der Spek (ml_at_[hidden])
Date: 2013-01-01 10:13:31
On Mon, Dec 31, 2012 at 12:33 AM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> On Dec 30, 2012, at 1:37 AM, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
>
>> On 29/12/12 15:33, Daniel James wrote:
>>
>>> Easy conversion to std::basic_string. There's a C++11 explicit string
>>> operator, but that isn't much good for portable code. Something like a
>>> 'string' or 'to_string' member would do the trick.
>>
>> Why not make string_ref implicitly convertible when in C++03?
>
> Because it's an expensive conversion.
So is construction from a literal (AFAIK), which isn't explicit either.
Explicit is in the proposal though.
-- Olaf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk