www.digitalmars.com         C & C++   DMDScript  

c++ - Bug on namespace???

reply 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
parent "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
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 20 2002