Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Examples of storing, passing and calling std::function objects using lambdas and std::bind.
- The first example demonstrates a basic case and the second covers functions with parameters.
- ## Usage
- The following command compiles, executes and removes the example.
- ## firstclass.cpp
- ```sh
- c++ -o 1-firstclass 1-firstclass.cpp -std=c++11 \
- && ./1-firstclass \
- && rm 1-firstclass
- ```
- ## firstclass-with-params.cpp
- ```sh
- c++ -o 2-firstclass-with-params 2-firstclass-with-params.cpp -std=c++11 \
- && ./2-firstclass-with-params \
- && rm 2-firstclass-with-params
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement