On Sat, May 01, 2010 at 11:39:00AM +0200, Christopher Zimmermann wrote:
Why do some C++ programmer still use macros where they're not needed ?
bunch of idiots, let them stay with C.
#include<err.h>
template<typename T>
inline T WarnIfNULL(T x)
{
if (!x)
warn("blub");
return x;
}
class A
{
protected:
int a;
};
class B : A
{
public:
void blub()
{
WarnIfNULL(A::a);
}
};