blob: 798c626f2b20a8917b42352c2c6b22834fa01f1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "../c++/tls.hpp"
saw::error_or<void> real_main(){
using namespace saw;
auto eo_aio = setup_async_io();
if(eo_aio.is_error()){
return eo_aio.get_error();
}
auto& aio = eo_aio.get_value();
return make_void();
}
int main(){
auto eov = real_main();
if(eov.is_error()){
auto& err = eov.get_error();
std::cerr<<"[Error]: "<<err.get_category()<<" - "<<err.get_message()<<std::endl;
return err.get_id();
}
return 0;
}
|