@mirabilos@toot.mirbsd.org oh yeah, nullptr is not NULL and they are not interchangeable
nullptr is its own type that can be implicitly compared and converted to pointer types, but not to integer types. in C, NULL can be defined as something like (void*)0. that's not allowed in C++, NULL has to be an integer constant.
so, you're comparing NULL (the null pointer constant, an integer) with nullptr (a type that is, again, not a pointer at all, and isn't implicitly converted because the lvalue isn't a pointer either) and you get that error which is completely correct
Conversation
Notices
-
Embed this notice
linear cannon (linear@nya.social)'s status on Wednesday, 18-Oct-2023 06:44:43 JST linear cannon - Haelwenn /элвэн/ :triskell: likes this.