utils: add Result / Option types

Add some Rust-style Result/Option types, based on TartanLlama's
expected, optional classes.

There's std::optional of course, but we can't depend on C++17 yet.
This commit is contained in:
Dirk-Jan C. Binnema
2020-11-09 09:20:54 +02:00
parent 13118ae173
commit 702a1d8452
6 changed files with 4465 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2019 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2019-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
@ -129,8 +129,6 @@ private:
std::string what_;
};
} // namespace Mu
#endif /* MU_ERROR_HH__ */