effective c++
[EMCpp]Item-10 Prefer Scoped enums to Unscopded enums
· β˜• 4 min read

Enumerators of scoped enums are visible only within the enum, convert to other types only with a cast, and always support forward-declared because their default underlying type is int.


[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.