functor_define-snippet.h 86 Bytes
Newer Older
1 2 3 4 5
struct DoubleFunctor {
  void operator()(int& to_double) {
    to_double *= 2;
  }
};