Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12917: string_ref not constructible from rvalue strings anymore
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-03-20 23:20:03
#12917: string_ref not constructible from rvalue strings anymore
-------------------------------+------------------------
Reporter: mgaunard | Owner: marshall
Type: Bugs | Status: new
Milestone: To Be Determined | Component: utility
Version: Boost 1.64.0 | Severity: Regression
Resolution: | Keywords:
-------------------------------+------------------------
Comment (by arvid.norberg@â¦):
one example of this from my project:
{{{
std::string combine_path(string_view left, string_view right);
}}}
It used to be possible to nest these, like this:
{{{
auto a = combine_path(foo, combine_path(bar, b));
}}}
in boost-1.64 this is no longer possible, a proposed work-around is to
introduce a {{{string_view make_sv(std::string const&)}}} function, to
turn the temporary into an lvalue and construct the string_view from that.
[https://github.com/arvidn/libtorrent/pull/1814]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12917#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-03-20 23:22:52 UTC