aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-02-12 13:43:32 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-02-12 13:43:32 +0100
commitc8a0b9d5cbfe6619f8b38118f5b1d1875d1c5309 (patch)
tree567a646e6e787b8cde8c4c9fd84fdb444f1a4e5e /src/libutil
parent52419f8db3ed4806f8114a98f94a68f3b249f065 (diff)
experimental/optional -> optional
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/lru-cache.hh4
-rw-r--r--src/libutil/serialise.cc2
-rw-r--r--src/libutil/util.cc2
-rw-r--r--src/libutil/util.hh6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libutil/lru-cache.hh b/src/libutil/lru-cache.hh
index 9b8290e63..8b83f842c 100644
--- a/src/libutil/lru-cache.hh
+++ b/src/libutil/lru-cache.hh
@@ -2,7 +2,7 @@
#include <map>
#include <list>
-#include <experimental/optional>
+#include <optional>
namespace nix {
@@ -64,7 +64,7 @@ public:
/* Look up an item in the cache. If it exists, it becomes the most
recently used item. */
- std::experimental::optional<Value> get(const Key & key)
+ std::optional<Value> get(const Key & key)
{
auto i = data.find(key);
if (i == data.end()) return {};
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 0e75eeec2..8201549fd 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -171,7 +171,7 @@ std::unique_ptr<Source> sinkToSource(
std::function<void(Sink &)> fun;
std::function<void()> eof;
- std::experimental::optional<coro_t::pull_type> coro;
+ std::optional<coro_t::pull_type> coro;
bool started = false;
SinkToSource(std::function<void(Sink &)> fun, std::function<void()> eof)
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 7eca35577..e3dcd246c 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -965,7 +965,7 @@ std::vector<char *> stringsToCharPtrs(const Strings & ss)
string runProgram(Path program, bool searchPath, const Strings & args,
- const std::experimental::optional<std::string> & input)
+ const std::optional<std::string> & input)
{
RunOptions opts(program, args);
opts.searchPath = searchPath;
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index bda87bee4..9f239bff3 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -14,7 +14,7 @@
#include <cstdio>
#include <map>
#include <sstream>
-#include <experimental/optional>
+#include <optional>
#include <future>
#ifndef HAVE_STRUCT_DIRENT_D_TYPE
@@ -259,14 +259,14 @@ pid_t startProcess(std::function<void()> fun, const ProcessOptions & options = P
shell backtick operator). */
string runProgram(Path program, bool searchPath = false,
const Strings & args = Strings(),
- const std::experimental::optional<std::string> & input = {});
+ const std::optional<std::string> & input = {});
struct RunOptions
{
Path program;
bool searchPath = true;
Strings args;
- std::experimental::optional<std::string> input;
+ std::optional<std::string> input;
Source * standardIn = nullptr;
Sink * standardOut = nullptr;
bool _killStderr = false;