Skip to content

Instantly share code, notes, and snippets.

@parsa
Created September 22, 2019 19:53
Show Gist options
  • Save parsa/26d09707974a99ad710df411fedcca39 to your computer and use it in GitHub Desktop.
Save parsa/26d09707974a99ad710df411fedcca39 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <span>
int main()
{
int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
std::span<int> b(a);
auto c = b.subspan(1, 3);
for (auto& i : c)
{
std::cout << i << ", ";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment