using enum from another namespace

O

Old Wolf

My compiler chokes on the following code:

namespace foo
{
typedef enum E { buz, baz } E;
};
namespace bar
{
using foo::E;
};

(it says "Multiple declaration for enum foo::E").
If I change the typedef to "typedef enum E { buz, baz } F;"
then there is no problem with either "using foo::E" or "using foo::F".

Is this a compiler bug? I am working around it by not typedeffing
the enums (They were in a header file which was to be used from both
C and C++).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top