An unary functor for the dereferenciation of pointers with null pointer checking.
More...
#include <Dereferencer.hpp>
|
ResType | operator() (const ArgType &ptr) const |
| Returns a reference to or copy of the pointed-to argument object. More...
|
|
template<typename ArgType, typename ResType>
struct CDPL::Util::NullCheckDereferencer< ArgType, ResType >
An unary functor for the dereferenciation of pointers with null pointer checking.
- Template Parameters
-
ArgType | The pointer type. |
ResType | The type of the pointer dereferenciation result. |
- Note
- The type resulting from dereferencing ArgType must be convertible to ResType. If ResType is a not a reference, a copy of the pointed-to object will be returned.
◆ result_type
template<typename ArgType , typename ResType >
◆ operator()()
template<typename ArgType , typename ResType >
Returns a reference to or copy of the pointed-to argument object.
- Parameters
-
ptr | A pointer of type ArgType to an object. |
- Returns
- A copy of or reference to the object.
- Exceptions
-
The documentation for this struct was generated from the following file: