using Data = char[10];
void f(Data x)
{
x = nullptr; // this compiles
}
void g(Data &x)
{
x = nullptr; // this does not compile, msvc complain "expression must be a modifiable lvalue
}
I am confused why the assignment expression in f compiles, but does not compile in g. I expect that both assignment will fail since array type is not modifiable.
Any reference to c++ standard will be appreciated.