span

class span

Non-member Functions

template<
class SrcElementType,
std::size_t SrcExtent,
class DestElementType,
std::size_t DestExtent
>
void copy(span<SrcElementType, SrcExtent> src, span<DestElementType, DestExtent> dest)

Copies all the elements from one gsl::span to another.

According to the authors:

This will generate faster code than std::copy using span iterator in older msvc+stl. [This is] not necessary for msvc since VS2017 15.8 (_MSC_VER >= 1915)

Parameters
  • src – The span to copy from.

  • dest – The span to copy to.