Clang and GCC disagree on accepting this code.
What is the standard required behavior?
#include <utility>
#include <iostream>
#include <vector>
int main()
{
std::vector pairs = {std::pair{1,11},{2,22}, {3,33}};
for (const auto& p: pairs) {
std::cout << p.second << std::endl;
}
}
Note: I know this is C++ so it is possible that the standard is fuzzy, but I presume one behavior is correct.