Advertisement
Guest User

Untitled

a guest
May 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <functional>
  3.  
  4. void use_constRef_fun(const std::function<void(void)>& fun) {
  5. fun();
  6. }
  7.  
  8. int main()
  9. {
  10. use_constRef_fun([](){ std::cout << "Bar" << std::endl; });
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement