C++20 Quiz

12 questions available • Test your knowledge of modern C++ features

settings.hpp
Question 1/12|0/0 correct
true_false.cpp
#std::spanbeginner

// Is this statement true or false?

std::span is a view over a contiguous sequence of objects, similar to string_view for strings.

void process(std::span<int> data) {
    for (int x : data) { /* ... */ }
}
std::vector<int> v = {1, 2, 3};
int arr[] = {4, 5, 6};
process(v);    // Works with vector
process(arr);  // Works with array