mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-13 12:33:20 +02:00
15 lines
273 B
C++
15 lines
273 B
C++
#undef NDEBUG
|
|
#include"Ev/Io.hpp"
|
|
#include"Ev/start.hpp"
|
|
#include"Ev/yield.hpp"
|
|
#include<assert.h>
|
|
|
|
int main() {
|
|
auto code = Ev::yield().then([]() {
|
|
throw int(42);
|
|
return Ev::lift(1);
|
|
}).catching<int>([](int _) {
|
|
return Ev::lift(0);
|
|
});
|
|
return Ev::start(code);
|
|
}
|