mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix copy_backward implementation
This commit is contained in:
parent
c9cce4582e
commit
8a4fca3aec
4 changed files with 11 additions and 9 deletions
|
@ -113,7 +113,7 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
static SPROUT_CXX14_CONSTEXPR char_type* move(char_type* s1, char_type const* s2, std::size_t n) {
|
||||
sprout::copy_backward(s2, s2 + n, s1);
|
||||
sprout::copy_backward(s2, s2 + n, s1 + n);
|
||||
return s1;
|
||||
}
|
||||
static SPROUT_CXX14_CONSTEXPR char_type* copy(char_type* s1, char_type const* s2, std::size_t n) {
|
||||
|
@ -199,7 +199,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename OutputIterator, typename ConstInputIterator>
|
||||
static SPROUT_CXX14_CONSTEXPR OutputIterator move(OutputIterator s1, ConstInputIterator s2, std::size_t n) {
|
||||
sprout::copy_backward(s2, s2 + n, s1);
|
||||
sprout::copy_backward(s2, s2 + n, s1 + n);
|
||||
return s1;
|
||||
}
|
||||
template<typename OutputIterator, typename ConstInputIterator>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue