Skip to content

Instantly share code, notes, and snippets.

@ogrant
ogrant / has_callable.cpp
Created April 1, 2012 15:29
C++11 Metaprogramming - Traits to check whether a function with a specific name can be called in the context defined by a signature
// Here is a traits structure I wrote to be able to determine if a function with
// a given name can be called in the context defined by a signature. This was
// originally not possible in C++03 - or at least a one solution works everywhere
// did not exist AFAIK.
//
// Olivier Grant
//
#include <iostream>
#include <iomanip>