4 ms·
Well, you could always begin another scope with each assignment. auto var = // this type can't be inferred because it's not used { auto var = 2;
by exprx 11y ago
Well, you could always begin another scope with each assignment.
auto var = // this type can't be inferred because it's not used
{
auto var = 2;
}
I'm too exhausted to think why this may not be applicable.
- marvy 11y agoPython: x = 2 if stringy: x = '2' print x+x # 4 or 22??? C++: int x = 2; if(stringy) string x = "2"; print x+x; // 4 (string x is out of scope)