Replace boost::optional with std::optional (#6611)
This commit is contained in:
@@ -39,7 +39,7 @@ template <typename Key, typename Value> struct CSVFilesParser
|
||||
{
|
||||
}
|
||||
|
||||
// Operator returns a lambda function that maps input Key to boost::optional<Value>.
|
||||
// Operator returns a lambda function that maps input Key to std::optional<Value>.
|
||||
auto operator()(const std::vector<std::string> &csv_filenames) const
|
||||
{
|
||||
try
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm::updater
|
||||
@@ -12,9 +11,9 @@ namespace osrm::updater
|
||||
|
||||
template <typename Key, typename Value> struct LookupTable
|
||||
{
|
||||
boost::optional<Value> operator()(const Key &key) const
|
||||
std::optional<Value> operator()(const Key &key) const
|
||||
{
|
||||
using Result = boost::optional<Value>;
|
||||
using Result = std::optional<Value>;
|
||||
const auto it =
|
||||
std::lower_bound(lookup.begin(),
|
||||
lookup.end(),
|
||||
@@ -50,7 +49,7 @@ struct SpeedSource final
|
||||
{
|
||||
SpeedSource() : speed(0.), rate() {}
|
||||
double speed;
|
||||
boost::optional<double> rate;
|
||||
std::optional<double> rate;
|
||||
std::uint8_t source;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user