Boost logo

Boost :

Subject: Re: [boost] [utility] string_ref construction from rvalue reference to string
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2014-08-01 18:24:10


On Aug 1, 2014, at 1:38 PM, Nathan Crookston <nathan.crookston_at_[hidden]> wrote:

> Андрей Давыдов wrote:
>
>>
>> Those errors can be caught at compile time if class "basic_string_ref"
>> defintion would contain lines like following:
>>
>> template<typename Allocator>
>> basic_string_ref(std::basic_string<charT, traits, Allocator> &&) = delete;
>>
>> I cannot understant does it prevent any correct usage of string_ref?
>>
>> +1. I can't think of a good reason to allow this.

It would mean that string_ref will no longer compile under C++03.
[ But it can certainly be done for C++11 and later ]

— Marshall


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk