Controlling overload resolution #2: Improving error messages for failed overload resolution

Overload resolution is one of C++ most complicated things and yet it works most of the time without the need to think about it. In this mini-series, I will show you how to control this complex machinery so it is even more powerful and completely under your control.

The second post shows you a simple way to improve the error messages when overload resolution fails and how to customize it completely.

» read more »
Author's profile picture Jonathan

Controlling overload resolution #1: Preventing implicit conversions

Overload resolution is one of C++ most complicated things and yet it works most of the time without the need to think about it. In this mini-series, I will show you how to control this complex machinery so it is even more powerful and completely under your control.

The first post shows you how to delete candidates and how you can use that to prevent implicit conversions.

» read more »
Author's profile picture Jonathan

AllocatorAwareContainer: Introduction and pitfalls of propagate_on_container_XXX defaults

While I was writing the std_allocator adapter of foonathan/memory I’ve learned some not so well-known facts about the STL Allocator and AllocatorAwareContainer concepts I’d like to share. Let’s take a deep breath and dive in into an aspect of the STL containers that isn’t that well covered: Allocator storage.

I will explain the comparison properties of Allocators, show the C++11 propagate_on_container_XXX traits and how the combination of the two can lead to an unnecessary pessimization and a probably not widely known case of undefined behavior.

» read more »
Author's profile picture Jonathan

Memory 0.4: Polishing, Error handling, Storage, Traits, Documentation and more

It took a really long time - three months minus one day - but I have finally finished version 0.4 of foonathan/memory. The release contains a lot of changes and has more than doubled the number of commits.

» read more »
Author's profile picture Jonathan