Can anyone tell me what this means?
(::Type*)0
actually it is part of this
return (is_modifytype()) ?
u.myfunction : (::Type*)0;
Multiplication * (Asterisk) Basic arithmetic operator used for multiplication; the result of an arithmetic operator is usually a numeric value. Division / Basic arithmetic operator used for division; the result of an arithmetic operator is usually a numeric value.
Zero is the lowest unsigned integer value, one of the most fundamental types in programming and hardware design. In computer science, zero is thus often used as the base case for many kinds of numerical recursion.
~0 is 0xffffffff, which is the binary representation of -1.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With