Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <functional>
- void use_constRef_fun(const std::function<void(void)>& fun) {
- fun();
- }
- int main()
- {
- use_constRef_fun([](){ std::cout << "Bar" << std::endl; });
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement