Fixed compile error using g++ < 4.7.3. See https://stackoverflow.com/questions/16007855/gcc-compilation-error-when-using-template-class-method-inside-lambda-expression