[keel] Make keel init not be a template anymore

This commit is contained in:
Gary Talent 2023-06-20 19:27:36 -05:00
parent c5233e0d1d
commit de50a5392a
2 changed files with 9 additions and 6 deletions

View File

@ -28,4 +28,10 @@ ox::Error init(
return {};
}
ox::Result<ox::UPtr<Context>> init(ox::UPtr<ox::FileSystem> &&fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<Context>();
oxReturnError(keel::init(ctx.get(), std::move(fs), appName));
return ctx;
}
}

View File

@ -19,11 +19,8 @@ ox::Error init(
ox::UPtr<ox::FileSystem> &&fs,
ox::CRStringView appName) noexcept;
template<typename Ctx = keel::Context>
ox::Result<ox::UPtr<Ctx>> init(ox::UPtr<ox::FileSystem> &&fs, ox::CRStringView appName) noexcept {
auto ctx = ox::make_unique<Ctx>();
oxReturnError(keel::init(ctx.get(), std::move(fs), appName));
return ctx;
}
ox::Result<ox::UPtr<Context>> init(
ox::UPtr<ox::FileSystem> &&fs,
ox::CRStringView appName) noexcept;
}