coding
[EMCpp]Item-8 Prefer Nullptr to 0 and NULL
· ☕ 3 min read

nullptr doean’t suffer from the overloading problem or the template deduction problem that 0 and NULL are susceptible to. It also improves code clarity.


[EMCpp]Item-5 Prefer Auto to Explicit Type Declarations
· ☕ 4 min read

Despite some pitfalls described in EMCpp item 2 and 6, auto variables are preferred for they must be initialized, are generally immune to type mismatches that can lead to portability or efficiency problems, can ease the process of refactoring, and typically require less typing than variables with explicitly specified types.


[EMCpp]Item-4 Know How to View Deduced Types
· ☕ 3 min read

Deduced types can often be seen using IDE editors, compiler error messages, and the Boost TypeIndex library, but the results of some tools may be neither helpful nor accurate.