From: Olivier on
Hi All,

I see two ways to import types in a specific namespace : using
declarations and typedefs. For example :

namespace <whatever> { using std::string; }

or

namespace <whatever> { typedef std::string string; }

So one can write :

namespace <whatever> { void do_something( string &str ); }

What are the pros and cons of each method ? How does this affect
overload resolution ? What is preferred ?

Thanks,

--
Olivier Grant

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

 | 
Pages: 1
Prev: Dual factories
Next: C++ Network library?