Use boost::optional and drop std back to 14

boost::optional works on stretch and doesn't add any depends. The
c++17 support in gcc isn't complete anyway.
This commit is contained in:
Monty Taylor 2019-02-11 15:27:50 +00:00
parent aa1cd8ed1c
commit 5a36c4a3eb
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ AC_DEFUN([OPENDEV_CANONICAL_TARGET],[
AX_IS_RELEASE(always)
AM_SILENT_RULES([yes])
AX_CXX_COMPILE_STDCXX([17],[],[mandatory])
AX_CXX_COMPILE_STDCXX([14],[],[mandatory])
AM_PROG_CC_C_O
AC_PROG_CC_STDC
gl_VISIBILITY

View File

@ -19,6 +19,7 @@
#include <config.h>
#include <pthread.h>
#include <boost/optional.hpp>
#include <cpprest/http_client.h>
#include <bits/stdc++.h>
@ -54,7 +55,7 @@ public:
// Lookup the hostname in the cache and return the URL if present.
// If the entry is present, it is moved to the head of the queue.
optional<const string> get(const string &key)
boost::optional<const string> get(const string &key)
{
auto location = map.find(key);
if (location == map.end())