reference:
https://en.cppreference.com/w/cpp/language/new
ISO 7.6.2.4.2
https://stackoverflow.com/questions/37924996/lambda-with-dynamic-storage-duration
https://en.cppreference.com/w/cpp/language/new
ISO 7.6.2.4.2
https://stackoverflow.com/questions/37924996/lambda-with-dynamic-storage-duration
#include <iostream>
using namespace std;
int main()
{
// movie 'Se7en"
auto fun = new auto([]() { cout << "oh he didn't know~~" << endl; });
(*fun)();
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.