Following code is not legal:
// .cpp file
{
using namespace X;
char text[] = {someENUMinX, someOtherENUMinX, ... };
}
The {} block gives error when used that way. How to accomplish this? I.e. to have ability to use whole namespace for some portion of variable declarations.
To put it in other way: is it possible to revoke using namespace? I have like 40 members in each namespace, and would like to switch to them during defining variables.
PS.: I am sorry for multiple edits. The question can be deleted if it's a problem.