copy algorithm overload fo POD types returned wrong iterator. Fix. (#167)

This commit is contained in:
Łukasz Iwaszkiewicz 2019-11-21 13:28:30 +01:00 committed by John Wellbelove
parent c69ca9e41d
commit 2fb7928ebc

View File

@ -73,8 +73,7 @@ namespace ETLSTD
copy(TIterator1 sb, TIterator1 se, TIterator2 db)
{
typedef typename ETLSTD::iterator_traits<TIterator1>::value_type value_t;
return TIterator2(memcpy(db, sb, sizeof(value_t) * (se - sb)));
return TIterator2(memcpy(db, sb, sizeof(value_t) * (se - sb)) + (se - sb));
}
// Other iterator