Why VC compiles this, but GCC does not?
#include <iostream>
struct B
{
int & x;
};
void func(B & b)
{
b.x = 5;
}
int main()
{
int y;
func(B{y});
std::cout << y;
}
is not it a redundant restriction that y cannot be changed in this way?