diff options
Diffstat (limited to 'src/optional.h')
-rw-r--r-- | src/optional.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/optional.h b/src/optional.h index a382cd7b77..40c6b6cc31 100644 --- a/src/optional.h +++ b/src/optional.h @@ -5,22 +5,16 @@ #ifndef BITCOIN_OPTIONAL_H #define BITCOIN_OPTIONAL_H +#include <optional> #include <utility> -#include <boost/optional.hpp> - //! Substitute for C++17 std::optional +//! DEPRECATED use std::optional in new code. template <typename T> -using Optional = boost::optional<T>; - -//! Substitute for C++17 std::make_optional -template <typename T> -Optional<T> MakeOptional(bool condition, T&& value) -{ - return boost::make_optional(condition, std::forward<T>(value)); -} +using Optional = std::optional<T>; //! Substitute for C++17 std::nullopt -static auto& nullopt = boost::none; +//! DEPRECATED use std::nullopt in new code. +static auto& nullopt = std::nullopt; #endif // BITCOIN_OPTIONAL_H |