Patrik Ingmarsson

Why not not Modern CMake

Lately I have worked a lot with the build framework/system in the project of my current assignment in automotive. Doing so I have noticed the benefit of writing CMake conforming with what is called ‘Modern CMake’, or rather the draw backs of not doing it. Therefore, I’d like to take the opportunity to share my […]

6 Useful New Features in C++17 – Part 5

Constexpr lambdas Since C++11 we are able to use the constexpr specifier which evaluates the expression at compile time, with C++17 lambdas can also be constant expressions. One use case could be to initialize constexpr variables that depend on other constexpr variables. See the following example: This example maybe is silly but imagine a much […]

6 Useful New Features in C++17 – Part 4

This is the fourth part of the series “6 Useful New Features in C++17”, the first part can be found here. If Statements with constexpr Condition This is a feature that perhaps has its main use while working with templated classes and such, but there are other uses as well, e.g., together with variadic arguments. […]

6 Useful New Features in C++17 – Part 3

This is the third part of the series “6 Useful New Features in C++17”, the first part can be found here. Init statements in if statements Like for statements, if and switch statements get an initializer part. Convenient when handling shared resources between threads. As an example, if there are a lot of workers that […]

6 Useful New Features in C++17 – Part 2

This is the second part of the series “6 Useful New Features in C++17”, the first part can be found here.   Structured Binding One thing that has been bugging me when trying to write nice looking code is iterating through maps. Most often it is when acting on information read from a JSON or […]

6 Useful New Features in C++17 – Part 1

In this 5 parts of blog series, Patrik from Scionova will talk about useful features in C++17, that can help you write better codes. Every Monday and Thursday new posts in this series¬†will come out. Every now and again, I have some time to spare in which I try to brush up or gain some […]