Advertisement
Guest User

Untitled

a guest
Dec 25th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <functional>
  2. using namespace std;
  3. using namespace std::placeholders;
  4.  
  5. int f1(int u)
  6. {
  7.   return u + 7;
  8. }
  9.  
  10. int f2(int u)
  11. {
  12.   return u + 13;
  13. }
  14.  
  15. int main()
  16. {
  17.   auto F = bind(plus<int>(), bind(f1, _1), bind(f2, _1));
  18.   int r = F(3);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement