MCPcopy Create free account
hub / github.com/0voice/cpp_new_features / main

Function main

cpp_20/020_span_front.cpp:6–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <iterator>
5#include <algorithm>
6int main()
7{
8 std::vector<int> v{1,2,3,4,5};
9 std::deque<int> d;
10 std::copy(v.begin(), v.end(),
11 std::front_insert_iterator<std::deque<int>>(d)); // or std::front_inserter(d)
12 for(int n : d)
13 std::cout << n << ' ';
14 std::cout << '\n';
15}

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected