mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Replace boost::optional with std::optional
This commit is contained in:
parent
fa7e803f3e
commit
fa4435e22f
7 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue