|
C++23 example, import std;
using namespace std;
int main() {
vector vec = {
"the", "quick", "brown", "fox",
"jumped", "over", "the", "lazy", "dog"
};
for (auto&& [i, it] : vec | std::views::enumerate)
println ("{}:{}", ++i, it);
}
As I keep mentioning, the features being copied, slowly erode D's relevance. |