Software! Math! Data! The blog of R. Sean Bowman
The blog of R. Sean Bowman

Posts with tag “metaprogramming”

November 22 2016

Recently I needed a way to check whether a callable C++ thing (like a lambda) could be applied to a given list of potential arguments. More precisely, I wanted to know, given a lambda f and list of arguments a1, a2, ..., an, whether the expression f(a1, a2, ..., an) would compile. I came up with a way to do it that I’m pleased with. Here’s an example of the interface:

Read more...