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

Function main

cpp_20/020_span_end.cpp:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <algorithm>
5
6int main()
7{
8 std::vector<int> v = { 3, 1, 4 };
9 if (std::find(std::begin(v), std::end(v), 5) != std::end(v)) {
10 std::cout << "found a 5 in vector v!\n";
11 }
12
13 int a[] = { 5, 10, 15 };
14 if (std::find(std::begin(a), std::end(a), 5) != std::end(a)) {
15 std::cout << "found a 5 in array a!\n";
16 }
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected