mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Replace boost::optional with std::optional
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user