You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a variable is defined inside a namespace, the namespace scope needs to be dropped to be able to access the variable
namespacetest {
bool something = true;
bool setting in;
}
//way to access
something = false;
setting = true;
//expected way to access
test::something = false;
test::setting = true;
It also means that it is impossible to use namespaces to separate different instances of variables. In the below example, all three instances of 'something' collide with each other
When a variable is defined inside a namespace, the namespace scope needs to be dropped to be able to access the variable
It also means that it is impossible to use namespaces to separate different instances of variables. In the below example, all three instances of 'something' collide with each other
The text was updated successfully, but these errors were encountered: