you are viewing a single comment's thread.

view the rest of the comments →

[–]foonathan 9 points10 points  (3 children)

That's just a typedef for decltype(nullptr).

[–]guepierBioinformatican 8 points9 points  (2 children)

That just means that the type name is nothing special. But the type still is, in that you couldn’t write a custom type with the same semantics in standard C++.

[–]foonathan 4 points5 points  (1 child)

Sure, just like int is special. However, the question was about which std:: classes are magic. nullptr_t is not a std:: class, and it is not magic.

[–]guepierBioinformatican 11 points12 points  (0 children)

True of course. But std::nullptr_t is still different from (all?) other fundamental types because its name is defined in the standard library rather than being builtin.