Quantcast
Channel: Simplify C++!
Browsing all 163 articles
Browse latest View live

std::string is not a Container for Raw Data

Sometimes we need unformatted data, simple byte sequences. At first glance, std::string might be a fitting data structure for that, but it is not. Think about data we get from […] The post std::string...

View Article


Simple data structures

Keep simple data structures simple! There’s no need for artificial pseudo-encapsulation when all you have is a bunch of data. Recently I have come across a class that looked similar […] The post Simple...

View Article


The pImpl Idiom

The pImpl idiom is a useful idiom in C++ to reduce compile-time dependencies. Here is a quick overview of what to keep in mind when we implement and use it. […] The post The pImpl Idiom appeared first...

View Article

Reduce Compilation Times With extern template

Today, I have a guest post by Daniele Pallastrelli about extern template for you. Daniele has been programming and designing software for the last 20+ years and he’ s passionate […] The post Reduce...

View Article

Cpp On Sea 2019 Trip Report

From February 3rd through February 6th I have been in Folkestone, UK, to visit the first C++ On Sea conference. There must be something in the water on that island […] The post Cpp On Sea 2019 Trip...

View Article


Macro Evil in C++ Code

Today, I am happy to announce a guest post by Andrey Karpov about the evil of macros. Andrey is a Microsoft MVP in the “Developer Technologies” category and one of […] The post Macro Evil in C++ Code...

View Article

algorithms and the KISS principle

You’ve probably heard about the rule to prefer standard algorithms over raw for loops. The major reason is that those algorithms say what is happening in the name and encapsulate […] The post...

View Article

Multiple dispatch over covariant functions

Today we have another guest post by Alfredo Correa. In his previous article, Functions of variants are covariant, Alfredo described the concept of a covariant function, that is, how a […] The post...

View Article


plf::list and the Disassembly of Time Complexity

In his third guest post, Matt Bentley shows us the impact of cache-locality on performance, using plf::list, his implementation of a cache-local linked list as example. Folks love to make […] The post...

View Article


Constexpr FizzBuzz – An Exercise in Compile-Time Calculations

Recently, I have given a workshop about language features introduced in C++14 and C++17. Since a major part of those features includes constexpr things, I gave my trainees the task […] The post...

View Article

Colony – A brief history of timing

In another guest post, Matt Bentley provides us with new insights into container performance, analyzing the implications on iteration costs of his implementation of the “bucket array” concept. Back in...

View Article

Rebooting the blog

After several months, even years of not writing a post, I am back and motivated to blog again – and more. My history of blogging When I started blogging in […] The post Rebooting the blog appeared...

View Article

Docker4c: portable C++ development environment

Installing everything we need to develop C++ applications can be a lengthy, even painful process. Docker makes it possible to build a development environment once and deploy it everywhere. The […] The...

View Article


Old new Project: Fix

When I wrote about rebooting the blog, I also wrote I’d reboot my toy project “Fix”. Here is what Fix is about – this time. What is Fix? Fix is […] The post Old new Project: Fix appeared first on...

View Article

[fix dev diary] Week 1: Preparations

This is the start of my dev diary blog post series, where I document the minutiae of what I am doing for my toy project Fix. The diary can also […] The post [fix dev diary] Week 1: Preparations...

View Article


[fix dev diary] Week 2: Foundation of the CLI App

In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 2: Foundation of the...

View Article

[fix dev diary] Week 3: create command and application service

In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 3: create command and...

View Article


[fix dev diary] Week 4: Closing in on core domain code

In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 4: Closing in on core...

View Article

[fix dev diary] Week 5: std::expected

In my dev diary blog post series, I document the minutiae of what I am doing for my toy project Fix. The diary can also be found in smaller bites […] The post [fix dev diary] Week 5: std::expected...

View Article

isValid()? Establish invariants and avoid zombie objects

When classes have an “isValid” method or similar, the code using them often is less clear and harder to maintain. If possible, validity should be an invariant that can not […] The post isValid()?...

View Article
Browsing all 163 articles
Browse latest View live