Monthly Archives: April 2017



code
Syntax [crayon-5d5e8b6422fd5506104153/]   [crayon-5d5e8b6422fdf060783438/] Note: the code from above is no longer necessary in C++14, the compiler will deduce the return type.   Usage / Usability Capture list [] take none of the variables from the enclosing scope [&] take all the variables from the enclosing scope by reference [=] […]

General features: lambda expressions


code
Syntax [crayon-5d5e8b642353f937994407/] Usage / Usability Type deduction happens at compile time Auto ignores references and const/volatile Hard to write [crayon-5d5e8b6423548039314627/]   Hard to know [crayon-5d5e8b642354e047729456/] PROS No more uninitialized variables, no more hidden bugs [crayon-5d5e8b6423551314549254/] avoid problems related to “type shortcuts” [crayon-5d5e8b6423555169527260/] std::vector<int>::size_type is specified to be an unsigned integral […]

General features: Auto specifier