Compiler errors when trying to overload operator+= for an enum
I'm having some problems trying to overload the += operator for an enum
I've defined within a namespace. I shouldn't need to actually use the
operator, however, a library I'm using (boost::icl) requires that the +=
operator is defined for the data I'm storing within the interval map.
Whenever I try to compile the code below, I get the following compiler
error using Intel C++:
error : enum "test::events" has no member "operator+="
test.h:
namespace test {
...
enum events {
SHUTIN = 0,
ACTIVE,
RECOMPLETE,
CTI,
RTP
};
events & events::operator+= (const events &rhs);
}; // end namespace test
test.cpp:
test::events & test::events::operator+= (const test::events &rhs) {
return *this;
}
No comments:
Post a Comment