A simple question, but I can't figure out the answer, neither on SO, nor on cppreference.com and similar sites.
Is it legal to return std::array by value, like so?
std::array<int, 3> f() {
return std::array<int, 3> {1, 2, 3};
}
If it is legal, then it's also legal to pass it to functions by value, right?