OOLua  2.0.1
C++ and Lua binding
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OOLUA::maybe_null< T > Struct Template Reference

Return trait for a pointer which at runtime maybe NULL. More...

#include <oolua_traits.h>

Detailed Description

template<typename T>
struct OOLUA::maybe_null< T >

Return trait for a pointer which at runtime maybe NULL.

The type returned from the function is a pointer instance whose runtime value maybe NULL. If it is NULL then lua_pushnil will be called else the pointer will be pushed as normal. No change of ownership will occur for the type. This is only valid for function return types.

Note
To be consistent in naming this should really be called maybe_null_return, however I feel this would be too long a name for the trait so "return" has been dropped.

The documentation for this struct was generated from the following file: