diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-02-12T12·43+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-03-14T13·10+0100 |
commit | ef52ccf035fe0bcd78226891022171a28dd6fcbe (patch) | |
tree | 25ca43089e573e826fd8341a2a436a93076c26d8 /src/libutil | |
parent | 86f3b94c8c28defd7402245d60af15ce429986ff (diff) |
experimental/optional -> optional
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/lru-cache.hh | 4 | ||||
-rw-r--r-- | src/libutil/serialise.cc | 2 | ||||
-rw-r--r-- | src/libutil/util.cc | 2 | ||||
-rw-r--r-- | src/libutil/util.hh | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/libutil/lru-cache.hh b/src/libutil/lru-cache.hh index 9b8290e634c9..8b83f842c324 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 0e75eeec2bfe..8201549fd7d0 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 7eca35577b01..e3dcd246c681 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 bda87bee433e..9f239bff371a 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; |