A
Alan Cobb
Hi,
In the managed C++ class below I get compile warning C4677
from VS2003. "signature of non-private function contains
assembly private type", even though the managed enum is
public. I have to drop the "enum" keyword from my member
variable declaration to keep the compiler happy.
Shouldn't I technically be able to use the "enum" keyword
without a warning?
Thanks,
Alan Cobb
namespace MCPP_ClassLib1
{
public __value enum eEnumType_MCPP { eMem1, eMem2 };
public __gc class Class_MCPP // Managed class
{
public:
// The compiler likes this:
static eEnumType_MCPP m_eEnumType_MCPP1;
// The compiler gives a warning C4677 for this:
// 'm_eEnumType_MCPP2': signature of non-private
// function contains assembly private type
// 'MCPP_ClassLib1::eEnumType_MCPP'
//
// static enum eEnumType_MCPP m_eEnumType_MCPP2;
};
}
For reference:
http://msdn.microsoft.com/library/en-us/vclang/html/_pluslang_c.2b2b_.enumeration_declarations.asp
In the managed C++ class below I get compile warning C4677
from VS2003. "signature of non-private function contains
assembly private type", even though the managed enum is
public. I have to drop the "enum" keyword from my member
variable declaration to keep the compiler happy.
Shouldn't I technically be able to use the "enum" keyword
without a warning?
Thanks,
Alan Cobb
namespace MCPP_ClassLib1
{
public __value enum eEnumType_MCPP { eMem1, eMem2 };
public __gc class Class_MCPP // Managed class
{
public:
// The compiler likes this:
static eEnumType_MCPP m_eEnumType_MCPP1;
// The compiler gives a warning C4677 for this:
// 'm_eEnumType_MCPP2': signature of non-private
// function contains assembly private type
// 'MCPP_ClassLib1::eEnumType_MCPP'
//
// static enum eEnumType_MCPP m_eEnumType_MCPP2;
};
}
For reference:
http://msdn.microsoft.com/library/en-us/vclang/html/_pluslang_c.2b2b_.enumeration_declarations.asp