I came across this code:
void f(const std::string &s);
And then a call:
f( *((std::string*)NULL) );
A
for the case you can make "empty object", which will play the role of the zero pointer
class Foo { static Foo empty; public: static bool isEmpty( const Foo& ref ) { return &ref==∅ } }