FlagsAttribute 2005

In porting from Managed C++ 2003 to Managed C++ 2005 I hit this error:

error C2337: 'FlagsAttribute' : attribute not found

The code looks like this:

[FlagsAttribute]
enum class AtomAttibutes{...

It appears they removed the FlagsAttribute for enums. Is there a new way to have enumerations that act as bit flags?

See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemflagsattributeclasstopic.asp

For old syntax.

Thx.

[778 byte] By [bessermt] at [2007-12-25]
# 1

FlagsAttribute works fine for me. Do you have a

using namespace System;

before using it ?

MikeDanes at 2007-9-3 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 2

That did it. My Intellisense is not working for some reason and somehow the old code was getting away without the using namespace System; When I could find nothing about FlagsAttribute in the description of new 2005 enum class syntax, I assumed there was some new way to do it. Nope.

Thanks.

bessermt at 2007-9-3 > top of Msdn Tech,Visual C++,Visual C++ Language...