diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-05 23:02:44 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-12-19 09:46:55 +0100 |
commit | fa4435e22f78f632a455016ce00a357009aac059 (patch) | |
tree | 2880dcbc02b4c6612c08759c1c4f7304a7328b53 /src/optional.h | |
parent | fa7e803f3e4df33117927aef6fef9bfaee4f410d (diff) | |
download | bitcoin-fa4435e22f78f632a455016ce00a357009aac059.tar.xz |
Replace boost::optional with std::optional
Diffstat (limited to 'src/optional.h')
-rw-r--r-- | src/optional.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/optional.h b/src/optional.h index 252d56fd58..40c6b6cc31 100644 --- a/src/optional.h +++ b/src/optional.h @@ -5,15 +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>; +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 |