1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

experimental/optional -> optional

This commit is contained in:
Eelco Dolstra 2019-02-12 13:43:32 +01:00
parent 86f3b94c8c
commit ef52ccf035
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
14 changed files with 26 additions and 26 deletions

View file

@ -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 {};

View file

@ -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)

View file

@ -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;

View file

@ -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;