Monthly Archives: April 2017



code
Syntax [crayon-5daeff181b037855090804/]   [crayon-5daeff181b041022626847/] 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-5daeff181b52f423609828/] Usage / Usability Type deduction happens at compile time Auto ignores references and const/volatile Hard to write [crayon-5daeff181b537217705482/]   Hard to know [crayon-5daeff181b558907139281/] PROS No more uninitialized variables, no more hidden bugs [crayon-5daeff181b55c960311193/] avoid problems related to “type shortcuts” [crayon-5daeff181b560499104465/] std::vector<int>::size_type is specified to be an unsigned integral […]

General features: Auto specifier