(I looked, but could not find anything like it; if you cheat, please close it).
Is there a way to prevent the inheritance of these two statements? For instance:
struct foo{
static void* operator new(std::size_t) {
}
static void operator delete(void* p, std::size_t) {
}
};
struct bar : public foo {
};
Now barinherits two operators - in this trivial case is not such a big problem, a problem arises if foo, and barhave data members (and, worse, as a distribution to fooneed to do differently with bar!) Is now a way to avoid this is which in bari would also implement the operators. However, if there are many derived types, the likelihood that you forget to override something is quite possible. So the question is, is there a way to prevent the inheritance of these operators?
: ++ 03 ( - , gcc)