Core Library
|
A class to simulate the proposed nullptr keyword. More...
#include <nullptr.hpp>
Public Member Functions | |
template<class T > | |
operator T * () const | |
Allow conversion to any type of null non-member pointer. | |
template<class C , class T > | |
operator T C::* () const | |
Allow conversion to any type of null member pointer. | |
Private Member Functions | |
void | operator& () const |
Don't allow address to be taken. |
A class to simulate the proposed nullptr keyword.
This was adapted from the May 2004 CUJ article by Herb Sutter.
nullptr_t::operator T * | ( | ) | const [inline] |
Allow conversion to any type of null non-member pointer.
nullptr_t::operator T C::* | ( | ) | const [inline] |
Allow conversion to any type of null member pointer.
void nullptr_t::operator& | ( | ) | const [private] |
Don't allow address to be taken.