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