Home » U++ Library support » U++ MT-multithreading and servers » Core/Inet.h -- unneeded "using namespace Upp"
Core/Inet.h -- unneeded "using namespace Upp" [message #50240] |
Sun, 02 September 2018 10:58 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi,
at line 601 of Core/Inet.h there's an "using namespace Upp" which bring problems with some external libraries.
Can it be removed ? It's a bad practice to have "using namespace" in headers.
Ciao
Massimo
|
|
|
|
Re: Core/Inet.h -- unneeded "using namespace Upp" [message #50242 is a reply to message #50241] |
Sun, 02 September 2018 11:34 |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Ah, thank you
As you're here... I still have problems with a name clash, but ONLY in Visual C. GCC does it correctly.
I've got a library that uses an 'IsEqual' function internally.
Upp uses the same 'IsEqual' in Upp namespace, in obsolete.h.
I removed ALL 'using namespace Upp' from my headers, but on Visual C the error is still there, saying that the
IsEqual call is ambiguous from Upp and the library's one, when instantiating a template.
Do you know if template istantiation does look at namespaces used AFTER includes ?
I mean :
#include <mylib.h>
using namespace Upp;
<instantiate some template in mylib.h which uses IsEqual function inside mylib.h>
IMHO it should NOT look at Upp::IsEqual... or yes ?
EDIT : I've also pre-processed my source, and I double checked that using namespace Upp is ONLY in the C++ file and AFTER all includes...
[Updated on: Sun, 02 September 2018 11:35] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 23:00:48 CEST 2024
Total time taken to generate the page: 0.02795 seconds
|