C++ often requires you to explicitly cast NULL to a specific type when it
is used to invoke a function template, which is tedious. We can add the
following class:
class Null {
public:
template <typename T>
operator T*() const { return NULL; }
};
Then the user should be able to write Null() wherever a NULL pointer is
expected, even when invoking a templatized function.
Original issue reported on code.google.com by shiq...@gmail.com on 8 Oct 2008 at 9:35
Original issue reported on code.google.com by
shiq...@gmail.com
on 8 Oct 2008 at 9:35