www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Bug on namespace???

↑ ↓ ← Steve <Steve_member pathlink.com> writes:
Hi Walter,

If class A has already been defined in global namespace, If we define class A in
any other namespace, N, dmc 8.31.1 generates error.  However, if class A in
namespace N is defined before, dmc compiles.

For example,

class A
{
};

namespace N
{
class A
{
};
}

The above code generates errors but the following does not.
namespace N
{
class A
{
};
}

class A
{
};

Thank you for your excellent job,
Steve
Nov 19 2002
↑ ↓ → "Walter" <walter digitalmars.com> writes:
I need to redo the namespace support. -Walter

"Steve" <Steve_member pathlink.com> wrote in message
news:arf761$2gll$1 digitaldaemon.com...
 Hi Walter,

 If class A has already been defined in global namespace, If we define

 any other namespace, N, dmc 8.31.1 generates error.  However, if class A

 namespace N is defined before, dmc compiles.

 For example,

 class A
 {
 };

 namespace N
 {
 class A
 {
 };
 }

 The above code generates errors but the following does not.
 namespace N
 {
 class A
 {
 };
 }

 class A
 {
 };

 Thank you for your excellent job,
 Steve

Nov 20 2002