Prefer std::optional over boost:optional:

Some of the boost::optionals must remain for now.  Both
boost::beast and SOCI have interfaces that require
boost::optional.
This commit is contained in:
Scott Schurr
2020-11-13 15:09:18 -08:00
committed by Nik Bougalis
parent 85307b29d0
commit 3b33318dc8
241 changed files with 1293 additions and 1248 deletions

View File

@@ -22,12 +22,12 @@
#include <ripple/beast/core/CurrentThreadName.h>
#include <ripple/core/impl/SNTPClock.h>
#include <boost/asio.hpp>
#include <boost/optional.hpp>
#include <cmath>
#include <deque>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <thread>
namespace ripple {
@@ -90,7 +90,7 @@ private:
std::mutex mutable mutex_;
std::thread thread_;
boost::asio::io_service io_service_;
boost::optional<boost::asio::io_service::work> work_;
std::optional<boost::asio::io_service::work> work_;
std::map<boost::asio::ip::udp::endpoint, Query> queries_;
boost::asio::ip::udp::socket socket_;
@@ -125,7 +125,7 @@ public:
error_code ec;
timer_.cancel(ec);
socket_.cancel(ec);
work_ = boost::none;
work_ = std::nullopt;
thread_.join();
}
}