Interested in advertising on Derpibooru? Click here for information!
My Little Ties crafts shop

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Description

No description provided.

Comments

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide

Digital Seapony
Non-Fungible Trixie -
My Little Pony - 1992 Edition

Book Horse Best Horse
@HwanyPlayz  
You’re welcome. I realize that I probably went into way more detail than necessary in a Derpibooru comment section, but it’s a subject I really enjoy talking (or writing) about.
Digital Seapony
Non-Fungible Trixie -
My Little Pony - 1992 Edition

Book Horse Best Horse
@HwanyPlayz  
Defining NULL as ((void\*)0) is valid in C, but C____ doesn’t allow implicit casting from void\* to any other pointer type, so before C++11, most implementations defined NULL as 0 or 0L.
 
However, that causes problems when dealing with overloaded functions, because given two functions with the signatures void print(int) and void print(char\*), a call of print(NULL) will prefer the first function on implementations where NULL is an int and refuse to compile altogether on grounds of ambiguity if NULL is 0L (because implicit conversions from 0L to int and from 0L to char\* are both allowed).
 
Since C++11, the standard states that NULL can be ““an integral literal with value zero, or a prvalue of type std::nullptr_t[](https://en.cppreference.com/w/cpp/types/NULL), depending on implementation. I don’t know about other implementations, but GCC 8.1 continues to define NULL as 0L, probably because changing it now would break legacy code.