On Wed, Jan 15, 2020 at 3:15 AM 马江 <majiang31...@gmail.com> wrote:
>
> Hello,
>   After  some google, I find there is no way to control the scope of
> "using" for the moment.  This seems strange as we definitely need this
> feature especially when writing inline member functions in c++
> headers.
>
>   Currently I am trying to build a simple class in a c++ header file
> as following:
>
> #include <string>
> using namespace std;
> class mytest
> {
>   string test_name;
>   int test_val;
> public:
>   inline string & get_name () {return test_name;}
> };

https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice

Reply via email to