Modern C++ 03

It may have come as a surprise to some that I moved to C++11 on my day to day job only very recently. One question it often raises is “how can you work without Modern C++?”. In this article I’ll try to defend that Modern C++ has almost nothing to do with C++11, 14 or 17.

In a recent episode of CppCast, Jason Turner asked me to give my perspective on what the life of a C++ developer was in the day to day business. As I explained, my company has been releasing versions of a financial software for more than 30 years now and we only made the move from C++03 to C++11 in the last months.

Continue reading Modern C++ 03

PIC, PIE and Sanitizers

Position-independent code (PIC) and Position-indendendent executables (PIEs) are nothing new, yet they are still a bit obscure compile toggles that you ignore until you can’t. Luckily for my readers, I had too un-ignore them to make things work. Here’s the after action report.

Last week I was stuck chasing an annoying bug. You know the kind: random crash, happens about once every 20 or 30 runs when the CI runs unit tests, can’t be reproduced by hand, doesn’t show-up on Valgrind

Continue reading PIC, PIE and Sanitizers

Simplifying build in C++ (part 2)

Package management and build systems are one of the next big challenges C++ is going to face. In this article series, I offer some thoughts and ideas to solve that. This post is the second part, where we talk about toolchain definition, how a standard could work and what challenges it would face.

Christmas and New Year Eve are that particular part of the year when we wish for impossible things and make unreasonable promises. Get a bottle of a 1999 DRC La Tâche, lose weight, have a C++ ecosystem with a built-in package manager…

Continue reading Simplifying build in C++ (part 2)

Better polymorphic ducks

In a previous post we discussed how to combine duck typing with runtime polymorphism. A polymorphic duck if you will. Today let’s see how we can improve on our original design to remove some limitations.

The use of the TEPS (Type Erasure (Sean) Parent Style) we have shown in the first part of this series gave us what I call a Polymorphic Duck: something that can walk like a duck and quack like a duck, but it not necessarly inherited from a base Duck class. Moreover, the quack() and walk() are expected to be free function, not methods, which allows for looser coupling (especially if they take arguments that have nothing to do with the duck itself).

Continue reading Better polymorphic ducks

Pagination