Ticket #12340: test.cpp

File test.cpp, 439 bytes (added by anonymous, 6 years ago)

test case.

Line 
1#include <boost/context/all.hpp>
2#include <Windows.h>
3
4int main()
5{
6 using ctx_t = boost::context::execution_context<void>;
7 ctx_t ctx([](ctx_t c) {
8 try {
9 *(int*)0 = 0;
10 } catch (std::exception &e) {
11
12 }
13 return c;
14 });
15 auto f = [&] {
16 auto f2 = [&] {
17 ctx = ctx();
18 };
19 __try {
20 f2();
21 } __except (EXCEPTION_EXECUTE_HANDLER) {
22 printf("hi!");
23 }
24 };
25 f();
26}