Use decltype in for_each.h