Re: [Boost-bugs] [Boost C++ Libraries] #9287: Additional string_ref constructors

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9287: Additional string_ref constructors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-30 17:09:59


#9287: Additional string_ref constructors
-------------------------------+----------------------------
  Reporter: psiha | Owner: marshall
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: utility
   Version: Boost 1.54.0 | Severity: Not Applicable
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by marshall):

 if you have two iterators that you know point to a contiguous sequence in
 memory you can create a string_ref

     thus: `string_ref sr(&b, std::distance(b, e));`

     or: `string_ref sr(&b, e - b);`

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9287#comment:3>
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-02-16 18:50:17 UTC