Esmond,
I disagree. Run this sample through your favorite compiler and see what
happens:
namespace foo1
{
class DOMDocument
{
public:
DOMDocument() {}
};
};
using foo1::DOMDocument;
namespace foo2
{
class DOMDocument
{
public:
DOMDocument() {}
};
};
using foo2::DOMDocument;
int
main(int argc, const char* argv[])
{
DOMDocument doc;
return 0;
}
Since DOMDocument was hoisted by both header files (assuming the two
namespaces are in separate header files, from separate libraries), you
can't use both libraries together. That defeats the purpose of using
namespaces in the first place.
Dave
"Pitt, Esmond"
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
cc: (bcc: David N
Bertoni/Cambridge/IBM)
11/06/2002 03:45 Subject: RE: Proposal Review: Using C++
Namespace
PM
Please respond
to xerces-c-dev
Tinny
As per my previous message, the 'correct' solution is to enumerate all the
namespace exports explicitly with using-declarations, e.g.
using Xerces::XercesDOMParser;
using Xerces::DOMDOcument;
// ...
in XercesDefs.hpp (or in each header file which exports a class). There is
no accidental namespace pollution with this technique, no
order-dependencies, and no user migration is required.
EJP
-----Original Message-----
From: Tinny Ng [mailto:tng-xml@;ca.ibm.com]
Sent: Thursday, 7 November 2002 12:53 AM
To: [EMAIL PROTECTED]
Subject: Re: Proposal Review: Using C++ Namespace
Hi everyone,
I have implemented the proposed C++ Namespace to the latest code base.
Since a number of response indicated no "using" clause in a global header,
I've removed that from the XercesDefs.hpp which then means users'
application has a migration item.
Please review the latest nightly build
(http://xml.apache.org/dist/xerces-c/nightly/2002-11-06/) and let me know
any comment.
Thanks!
Tinny
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
RE: Proposal Review: Using C++ Namespace
David N Bertoni/Cambridge/IBM Thu, 07 Nov 2002 08:30:28 -0800
- RE: Proposal Review: U... Brad Settlemyer
- Re: Proposal Review: Using C++ Name... Tinny Ng
- Re: Proposal Review: Using C++ ... Murray Cumming
- Re: Proposal Review: Using C++ Namespace Dick . Bridges
- RE: Proposal Review: Using C++ Namespace Samar Lotia
- RE: Proposal Review: Using C++ Namespace Urs Muff
- RE: Proposal Review: Using C++ Namespace Urs Muff
- RE: Proposal Review: Using C++ Namespace Pitt, Esmond
- RE: Proposal Review: Using C++ Namespace Pitt, Esmond
- RE: Proposal Review: Using C++ Namespac... David N Bertoni/Cambridge/IBM
- RE: Proposal Review: Using C++ Namespace MARobertson
- RE: Proposal Review: Using C++ Namespace Dick . Bridges
- RE: Proposal Review: Using C++ Namespac... David N Bertoni/Cambridge/IBM
- RE: Proposal Review: Using C++ Namespace Dick . Bridges
