Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a no-op "do nothing" function object exist in C++(0x)?

I realize this is a ludicrous question for something that takes less than 2 seconds to implement. But I vaguely remember reading that one was introduced with the new standard.

I grep'ed VC10's headers and came up with nothing. Can you help? It's bugging me! :)

edit: On second thought, the new functor I was remembering was probably the unrelated std::default_deleter.


1 Answers

You could always write a no-op lambda: []{}

like image 133
2 revs, 2 users 67%tzaman Avatar answered Sep 07 '25 19:09

2 revs, 2 users 67%tzaman