use std::make_optional for backwards compat on older toolchains

This commit is contained in:
Jeff Becker 2021-06-19 09:39:10 -04:00
parent 2122463d98
commit 5c512601bf
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
1 changed files with 1 additions and 3 deletions

View File

@ -58,9 +58,7 @@ namespace llarp
{
if (EnsurePrivateFile(pathname))
return {};
std::string f = pathname.string();
return T{pathname, mode};
return std::make_optional<T>(pathname, mode);
}
using PathVisitor = std::function<bool(const fs::path&)>;