fork(7) download
  1. #include <functional>
  2.  
  3. struct callback : std::function<void(const callback&)> {
  4. using std::function<void(const callback&)>::function;
  5. };
  6.  
  7. void test(const callback& cb) {}
  8.  
  9. int main() {
  10. callback cb = test;
  11. test(cb);
  12. return 0;
  13. }
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty