T
toton
Hi,
Is it possible to have a class level namespace opening instead of
file level .
Something like this,
I have a long namespace like
namespace com { namespace my_company{ namespace my_project{ namespace
parser{
class my_parser{
};
}}}}
Now when I want to use this , I usually make a shortcut and use it,
with the assumption that I am working at my_project level, thus no
name resolution at that level is needed.
thus in the file,
namespace parser = com::my_company::my_project:
arser;
Thus it is in the file scope.
Then use it as parser::my_parser in the header;
The same thing also can be done at function scope.
However, how this can be done in the class scope ?
like,
class my_parser_usage{
namespace parser = com::my_company::my_project:
arser;
public:
parser::my_parser get_pasrer()const;
}
class my_second_parser_usage{
namespace parser = com::my_company::my_project:
arser2;
public:
parser::my_parser get_pasrer()const;
}
Thanks
abir
Is it possible to have a class level namespace opening instead of
file level .
Something like this,
I have a long namespace like
namespace com { namespace my_company{ namespace my_project{ namespace
parser{
class my_parser{
};
}}}}
Now when I want to use this , I usually make a shortcut and use it,
with the assumption that I am working at my_project level, thus no
name resolution at that level is needed.
thus in the file,
namespace parser = com::my_company::my_project:
Thus it is in the file scope.
Then use it as parser::my_parser in the header;
The same thing also can be done at function scope.
However, how this can be done in the class scope ?
like,
class my_parser_usage{
namespace parser = com::my_company::my_project:
public:
parser::my_parser get_pasrer()const;
}
class my_second_parser_usage{
namespace parser = com::my_company::my_project:
public:
parser::my_parser get_pasrer()const;
}
Thanks
abir