page = arthur o'dwyer – stuff mostly about c++
url = https://quuxplusone.github.io/blog
concepts metaprogramming templates
In Bjarne Stroustrup’s paper P0557R1 “Concepts: The Future of Generic Programming” (January 2017), section 6 is titled “Concept Overloading,” which Stroustrup distinguishes from the traditional approach “using helper functions and tag dispatch.” More subtly, Stroustrup seems to distinguish between true “overloading” (asking the compiler to resolve among multiple viable overloads) and other means of giving-two-things-the-same-name:
Where we cannot overload, we need to use workarounds (e.g., traits,
enable_if
, or helper functions).
I’ll present two problems, each with two solutions (one in C++11 and one in C++20), which I think illustrate something interesting about “concept overloading” versus… other things. …