Changes between Initial Version and Version 1 of Ticket #9287, comment 3


Ignore:
Timestamp:
Dec 30, 2014, 6:58:50 PM (8 years ago)
Author:
Marshall Clow

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9287, comment 3

    initial v1  
    11if you have two iterators that you know point to a contiguous sequence in memory you can create a string_ref
    22
    3     thus:  `string_ref sr(&b, std::distance(b, e));`
     3    thus:  `string_ref sr(&*b, std::distance(b, e));`
    44
    5     or:     `string_ref sr(&b, e - b);`
     5    or:     `string_ref sr(&*b, e - b);`
    66