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

Function main

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

Source from the content-addressed store, hash-verified

4#include <algorithm>
5
6int main()
7{
8 int a[] = {4, 6, -3, 9, 10};
9 std::cout << "Array backwards: ";
10 std::copy(std::rbegin(a), std::rend(a), std::ostream_iterator<int>(std::cout, " "));
11
12 std::cout << "\nVector backwards: ";
13 std::vector<int> v = {4, 6, -3, 9, 10};
14 std::copy(std::rbegin(v), std::rend(v), std::ostream_iterator<int>(std::cout, " "));
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected