B
BCC
Hi,
I have a large mfc project that has been working fine. A while ago, I added
an enum and I want to make a vector of these enums:
class MyClass {
public:
MyClass() {};
~MyClass() {};
enum {
abc = 1,
def = 2,
} ETestType;
};
// In a function later:
std::vector<MyClass::ETestType> types;
So far so good... but then if I try to add anything:
types.push_back(MyClass::abc);
I get the following error:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(376): error
C2666: 'std::_Ptrit<enum MyClass::ETestType,int,enum
MyClass::ETestType*,enum MyClass::ETestType&,enum MyClass::ETestType*,enum
MyClass::ETestType&>:perator`+'' : 2 overloads have similar conversions
I created a small test app, and there is no problem with this, so it appears
to be something specific to this app. I do not have any overloaded
operators relating to vector or ETestType -anywhere-.
At my wits end, google didn't pan out, anyone offer any hints or suggestions
on where I should look?
Thanks,
Bryan
I have a large mfc project that has been working fine. A while ago, I added
an enum and I want to make a vector of these enums:
class MyClass {
public:
MyClass() {};
~MyClass() {};
enum {
abc = 1,
def = 2,
} ETestType;
};
// In a function later:
std::vector<MyClass::ETestType> types;
So far so good... but then if I try to add anything:
types.push_back(MyClass::abc);
I get the following error:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(376): error
C2666: 'std::_Ptrit<enum MyClass::ETestType,int,enum
MyClass::ETestType*,enum MyClass::ETestType&,enum MyClass::ETestType*,enum
MyClass::ETestType&>:perator`+'' : 2 overloads have similar conversions
I created a small test app, and there is no problem with this, so it appears
to be something specific to this app. I do not have any overloaded
operators relating to vector or ETestType -anywhere-.
At my wits end, google didn't pan out, anyone offer any hints or suggestions
on where I should look?
Thanks,
Bryan