By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,302 Members | 1,429 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,302 IT Pros & Developers. It's quick & easy.

using enum from another namespace

P: n/a
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++).

Jul 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.