lightning talk
Paranthesis [crayon-5cb9e782181a6332622983/] Returning non-bools [crayon-5cb9e782181b3981050542/] Returning bools [crayon-5cb9e782181b9071370064/] Reusing data Similar behavior in if/else branches [crayon-5cb9e782181bf446074091/] Similar behavior in if/else branches [crayon-5cb9e782181c5498313970/] Same behavior on both branches – move it outside the branches. [crayon-5cb9e782181cb953136818/] Condition that appears on all steps – Check it only once. [crayon-5cb9e782181d0293114806/]

Lightning talk #6 – Refactoring steps

Definition [crayon-5cb9e78219ac2693273772/] Fills the range [first, last) with sequentially increasing values, starting with value and repetitively evaluating ++value.   Syntax [crayon-5cb9e78219acc931056336/] 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-5cb9e78219ad2290598119/] So what do we have here? I’ve added a […]

std::iota and custom incrementable

trip report
A few days ago there was the WG21 meeting in San Diego and the committee have some excellent news for the upcoming C++20 and C++23. From the major features: Ranges, Concepts, and Contracts were merged into the C++20 standard. Modules and Coroutines will most likely be added in C++23. For […]

(C++20) 2018 San Diego ISO C++ Committee Trip Report : ...

Below you’ll find a list of problems I’ve made for testing the modern C++ knowledge. There are no hints here, so this is a knowledge check. Refactor as much as you want. All the answers are in my other posts, feel free to check them here. [crayon-5cb9e78219f96623815986/]  

Practical work: Refactoring old code to Modern C++ (11 / ...

Definition std::terminate is called when exception handling fails, if: an exception was thrown and not handled the constructor or the destructor of a static or thread-local object throws an exception a noexcept specification is violated (exception is thrown in a function declared noexcept) …and many others – But these are […]

using std::terminate or “how to call that last function before ...

Hello guys, CPPCon 2018 is here (on youtube actually) so there’s a whole bunch of new videos ready to be seen. Click here for the playlist! Enjoy your view!

CPPCon 2018 is here!

Syntax [crayon-5cb9e7821a7f5915818628/] Usage / Usability This feature is introduced mainly to take care of the pitfalls generated by using the (infamous and nasty) NULL macro. NULL is nothing but a preprocessor expanding to 0 at compile time and this expansion often leads to ambiguity. [crayon-5cb9e7821a7fe221038500/] Given the following functions, how […]

General features: nullptr

Definition – unordered set / multiset [crayon-5cb9e7821ae0f837646736/] Definition – unordered map / multimap [crayon-5cb9e7821ae18290685933/] Syntax [crayon-5cb9e7821ae1e479663322/] Internally, the elements are not sorted in any particular order, but organized into buckets. Which bucket an element is placed into depends entirely on the hash of its value. This allows fast access to […]

STL Containers: Unordered containers

CPPEurope 2019 is almost here, and I’m excited to be there next year too! Make sure you follow their website and buy the tickets when they will be available. Feel free to also check my post about last year’s con. See you there!

CPPEurope 2019

Below you’ll find a list of problems I’ve made for testing the modern C++ knowledge level. All the answers are in my other posts, feel free to check them here or in the following link.

Practical work: Modern C++ (11 / 14)

Syntax [crayon-5cb9e7821b239623796784/] Invoke gives a uniform way of calling methods and functions. But why would we use this ? Let’s try to call some class functions, assuming we have the following struct defined. [crayon-5cb9e7821b242923324289/] Before invoke: [crayon-5cb9e7821b248297979594/] After invoke: [crayon-5cb9e7821b24d506851233/] This is pretty handy when you would like / need […]

Library feature: std::invoke

Dynamic vs Static library A static library gets compiled into the client. A .lib is used at compile time and the contents of the library become part of the consuming executable. A dynamic library is loaded at runtime and not compiled into the client executable.   Static library – Pro […]

Definitions – Dynamic vs static library