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-5c6ab41da555b655909117/] 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-5c6ab41da5565214761828/] Given the following functions, how […]

General features: nullptr

Definition – unordered set / multiset [crayon-5c6ab41da5b5b551209915/] Definition – unordered map / multimap [crayon-5c6ab41da5b64649637536/] Syntax [crayon-5c6ab41da5b6a002783965/] 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-5c6ab41da5f5f884214782/] 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-5c6ab41da5f68002103619/] Before invoke: [crayon-5c6ab41da5f6e825617006/] After invoke: [crayon-5c6ab41da5f74804909895/] 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

Compilation Compilation is the process that converts high level language into machine level language. Preprocessing Compilation Linking   Preprocesing is responsible for: -replacing #include directives with the content of the respective files (which is usually just declarations) -replacement of macros (#define) -selecting different portions of text depending of #if, #ifdef […]

Definitions – Compilation

Syntax [crayon-5c6ab41da6458902936357/] Usage / Usability Resolve the problems we had with the old enums Can be silently converted to int The enum ids are exported in the scope in which the enum is defined, causing name clashes They have implementation-defined underlying type – type cannot be specified by the developer […]

Miscellaneous: Strongly typed enums

Definition Both TCP and UDP are protocols used for sending bits of data — known as packets — over the Internet. They both build on top of the Internet protocol. In other words, whether you are sending a packet via TCP or UDP, that packet is sent to an IP […]

Definitions – TCP versus UDP

unit testing
What is unit testing? Unit testing simply verifies that individual units of code (mostly functions) work as expected. The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly […]

Definitions – Unit testing