mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 02:44:10 +00:00
Use std::copy() rather than std::copy_n() to support pre-C++11 standard libraries
This commit is contained in:
parent
904e2c3c81
commit
090ab12074
@ -160,7 +160,9 @@ namespace boost {
|
||||
if ( pos > size())
|
||||
BOOST_THROW_EXCEPTION( std::out_of_range ( "string_view::copy" ) );
|
||||
size_type rlen = (std::min)(n, len_ - pos);
|
||||
std::copy_n(begin() + pos, rlen, s);
|
||||
// use std::copy(begin() + pos, begin() + pos + rlen, s) rather than
|
||||
// std::copy_n(begin() + pos, rlen, s) to support pre-C++11 standard libraries
|
||||
std::copy(begin() + pos, begin() + pos + rlen, s);
|
||||
return rlen;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user