Three vectors. You want to iterate over all of them as one sequence
C++23 ranges: copy everything into a new container, or write three separate loops
C++26: views::concat(v1, v2, v3) โ zero copies, one range
Our mission is to make the C++ programming language accessible and useful to anyone who wishes to learn and apply the language.
Joined November 2017
- const std::string& get() { return "oops"; // dangling reference } This compiles in C++23. The temporary string is destroyed, the reference dangles, and you get undefined behavior at runtime C++26 makes it a compile time error ๐งต๐
- Looking forward to the screening at CppCon!๐จ THE BOOST.DOCUMENTARY OFFICIAL TEASER TRAILER IS HERE From Mars rovers to CERN, Boost has helped power software around the world. But who are the people behind the libraries? Find out in Boost.Documentary, featuring Bjarne Stroustrup, Andrei Alexandrescu, Vinnie Falco, Dave
- std::string s = "hello"; std::string_view sv = " world"; auto result = s + sv; // error You can construct a string from a string_view. You can compare them. But you can't concatenate them C++26 adds the missing operator+
- std::optional holds zero or one value std::ranges work with sequences of values In C++23, they don't talk to each other. You can't pipe an optional into a range pipeline C++26 makes optional a range


