forked from TartanLlama/expected
First cut at Conanfile and Conan package test. (#50)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include <tl/expected.hpp>
|
||||
|
||||
tl::expected<int, const char*> maybe_do_something(int i) {
|
||||
if (i < 5) {
|
||||
return 0;
|
||||
} else {
|
||||
return tl::make_unexpected("Uh oh");
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
(void)argv;
|
||||
|
||||
return maybe_do_something(0).value_or(-1);
|
||||
}
|
||||
Reference in New Issue
Block a user