K
Kai-Uwe Bux
Hi folks,
please consider:
#include <list>
struct aaa {};
struct bbb {
aaa operator & ( void ) const {
return aaa();
}
};
int main ( void ) {
std::list< bbb > a;
}
Is this required to compile or is a compiler within its rights to reject the
code?
I recently posted a bug report and have been told that the code is invalid.
The address operator is supposed to be not overloaded. This, I have learned,
should follow from the provisions in C++03 about allocator::address(). I am
still trying to understand the reasoning, but I feel that I need some help.
Thanks
Kai-Uwe Bux
please consider:
#include <list>
struct aaa {};
struct bbb {
aaa operator & ( void ) const {
return aaa();
}
};
int main ( void ) {
std::list< bbb > a;
}
Is this required to compile or is a compiler within its rights to reject the
code?
I recently posted a bug report and have been told that the code is invalid.
The address operator is supposed to be not overloaded. This, I have learned,
should follow from the provisions in C++03 about allocator::address(). I am
still trying to understand the reasoning, but I feel that I need some help.
Thanks
Kai-Uwe Bux