Skip to content

Instantly share code, notes, and snippets.

@jmorrill
Created November 17, 2015 23:04
Show Gist options
  • Save jmorrill/73e914cd2bbf19cdd797 to your computer and use it in GitHub Desktop.
Save jmorrill/73e914cd2bbf19cdd797 to your computer and use it in GitHub Desktop.
vs 2015 crash.cpp
#include <functional>
#include <string>
int main()
{
std::string test_string = "abcde";
auto function1 = [=, test_string = std::move(test_string)]
{
auto test_string2 = std::move(test_string);
return [=, std::move(test_string2)]
{
printf("test string 2 %s", test_string2.c_str());
};
};
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment