1 2 3 4 5 6 7 8 9
// a.h: template <typename T> int counter() { static int cnt = 0; return ++cnt; } inline int f() { return counter<decltype([] {})>(); }