Skip to content

Instantly share code, notes, and snippets.

@gium
gium / gist:1069605
Created July 7, 2011 14:19
C++ traits to know if a type has a method.
#include <iostream>
#include <vector>
#include <list>
#include <set>
template <typename T>
struct HasPushBack {
typedef char yes[1];
typedef char no[2];