One C++17 problem I come across every now and then is to determine whether a certain class or
function template specialization exists - say, for example, whether
std::hash<SomeType> can be used. I like to have solutions for these kind of problems in a
template-toolbox, usually just a header file living somewhere in my project. In this article I try
to build solutions that are as general as possible to be part of such a toolbox.
I recently needed to trace some error related to C++17 class template argument deduction and came across some corner cases. In this article, I document what I learned, show some “paradox” cases (which have nice, clean solutions as per the standard) and demonstrate a suspected Clang bug.