The first comment is correct; it's a pre C++ 11 way of explicitly casting a null pointer to the correct type. And you are correct, it is equivalent to mark_filt = NULL;
, sort of.
C++ performs implicit type promotion for various conversions, but these are limited. In the case of pointers, the pre C++ 11 way was to use NULL
or (pointer_type *)
cast. NULL
itself has an implementation-specific definition and is implemented in different ways in the standard C++ headers (stdlib, I believe). Two common implementations of NULL
are:
#define NULL 0
#define NULL ((void *)0)
The ramifications of these depend on compiler, but the second will fail if assigned to a non-pointer type. It will be implicitly cast to the correct type as it is not specifying the record Type that it is pointing to (ie. void
is essentially a null type, void *
is a pointer to null type, or an unspecified type).
In C++ 11 and above, it is more common to use mark_filt = nullptr
, but this code would compile.
The MSDN site has some good documentation on this (no plug intended):