Last active
August 29, 2015 14:19
-
-
Save swkwon/88e406e515e6bf3f35c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::vector<std::function<void()>> fs; | |
class Widget | |
{ | |
public: | |
void get_func() | |
{ | |
fs.emplace_back([=]() | |
{ | |
std::cout << member << std::endl; | |
}); | |
} | |
private: | |
int member; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment