Can anyone tell me what this means?
(::Type*)0
actually it is part of this
return (is_modifytype()) ?
u.myfunction : (::Type*)0;
Can anyone tell me what this means?
(::Type*)0
actually it is part of this
return (is_modifytype()) ?
u.myfunction : (::Type*)0;
It means "cast the integer 0
(using a C-style cast) to the type Trip*
(Trip
pointer) found in the global namespace (::
)".
It should just use nullptr
- as in
return is_modifyCurrentTrip() ?
u.modifyCurrentTrip : nullptr;
Note: using ::
explicitly to designate the global namespace prevents the compiler from prepending any namespace names itself - this is completely irrelevant when just using nullptr
though.