That's a conversion operator, which allows the class to be converted to T*
. Usage:
T * p = TObj;
It's probably a bad idea for a smart pointer to provide this, as it makes it easy to accidentally get a non-smart pointer. Standard smart pointers provide explicit conversion via a get()
function instead, to prevent accidental conversions.