BUG: You receive a "fatal error C1001" error message when you try to unbox an enumeration (327972)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q327972 SYMPTOMS When you try to unbox an enumeration instance, you receive
the following compiler error message: You receive a "fatal error C1001" error when you try to unbox an enumeration:
INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2844) Please
choose the Technical Support command on the Visual C++ Help menu, or open
the Technical Support help file for more information. WORKAROUNDTo work around this problem, cast to the underlying type of
the _value enum, and then cast to the enum type. For example, to unbox an enumeration instance, instead of
using the following code: SomeEnum enum2 = *dynamic_cast<__box SomeEnum*>(obj); use the following code: SomeEnum enum2 = (SomeEnum)*__try_cast<Int32*>(obj); because the underlying type of _value enum is Int32. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
REFERENCESFor additional information about Managed Extensions for C++,
visit the following Microsoft Developer Network (MSDN) Web site:
Modification Type: | Major | Last Reviewed: | 1/6/2006 |
---|
Keywords: | kbProd2Web kbCompiler kberrmsg kbbug kbManaged KB327972 kbAudDeveloper kbAudITPRO |
---|
|