NULL is defined `((void *)0)`. Does (uintptr_t)NULL == 0? That is, does (uintptr_t)(void *)0 == (uintptr_t)0`?
@stevecheckoway @sevenps "It is only in pointer contexts that NULL and 0 are equivalent". (uintptr_t)(void *p)0 == 0 isn't pointer context
-
-
@BRIAN_____@sevenps Agreed, but (uintptr_t)NULL == 0 also isn't a pointer context (in C++) so there, it should just be comparing 2 integers -
@stevecheckoway@sevenps Yes, exactly. But, is the integer value of (uintptr_t)NULL the value 0? -
@BRIAN_____@sevenps Hmm. Thinking further, I think#define NULL nullptr is valid, so maybe it's implementation-defined in C++ too. Fun! -
@stevecheckoway@BRIAN_____ Indeed, nullptr_t -> uintptr_t has the meaning of (void*)0 -> uintptr_t.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.