Monthly Archives: November 2018


lightning talk
Paranthesis [crayon-5c6ab4c8c2b98702832802/] Returning non-bools [crayon-5c6ab4c8c2ba4285669925/] Returning bools [crayon-5c6ab4c8c2baa220715647/] Reusing data Similar behavior in if/else branches [crayon-5c6ab4c8c2baf675304141/] Similar behavior in if/else branches [crayon-5c6ab4c8c2bb5584409334/] Same behavior on both branches – move it outside the branches. [crayon-5c6ab4c8c2bbb349348081/] Condition that appears on all steps – Check it only once. [crayon-5c6ab4c8c2bc1871906167/]

Lightning talk #6 – Refactoring steps


code
Definition [crayon-5c6ab4c8c449d870300592/] Fills the range [first, last) with sequentially increasing values, starting with value and repetitively evaluating ++value.   Syntax [crayon-5c6ab4c8c44a6356003366/] But now let’s create a custom incrementable class. Iota is working with a T type, so we only need to overload the ++ operator. [crayon-5c6ab4c8c44ad238639231/] So what do we have here? I’ve added a […]

std::iota and custom incrementable




code
Syntax [crayon-5c6ab4c8c4903066855770/]   Tuples and data fetching Tuples are suggested for returning multiple values from a function. They are in a strong relation with std::tie, which is used for retrieving the values. The only problem is that we have to have all those variables previously declared. [crayon-5c6ab4c8c490d675330850/] But what if […]

Language feature: Structured binding



code
Syntax [crayon-5c6ab4c8c52c6562702173/] std::quoted was added in C++14 and it is used to take care of escaping quotes and backslashes in output streams, and unescaping them in input streams. This is handy for example if we want to use it in an SQL statement, in both ways (either add the escaping, […]

std::quoted and the “friendly” delimiters