Implementation of Closure in C++11