diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index c374d1574..2bedcc7d2 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -31,14 +31,15 @@ #pragma once -#include -#include -#include -#include +#include #include #include +#include +#include +#include #include -#include +#include +#include // Public interface for libwallet library namespace Monero { @@ -54,18 +55,9 @@ enum NetworkType : uint8_t { void onStartup(); } + // backwards compatible shim for old declaration of handmade optional<> struct template - class optional { - public: - optional(): set(false) {} - optional(const T &t): t(t), set(true) {} - const T &operator*() const { return t; } - T &operator*() { return t; } - operator bool() const { return set; } - private: - T t; - bool set; - }; + using optional = std::optional; /** * @brief Transaction-like interface for sending money