I have a function void get(boost::function<void(void)> callback) { callback(); }
.
I want to make a call like get(boost::bind(/* don t know what to put here*/));
without implementing any other functions, variables or structs, so that the callback does nothing.
Is it possible to implement such "no-op" callback in C++03 ?
使用<代码>boost:bind(<>>更可取,但不一定需要——可能还有其他一些trick,以实现我的目标。