forked from lix-project/lix
Solve template deduction problem
We had to predeclare our template functions
This commit is contained in:
parent
6c66331d5c
commit
0739d428e0
|
@ -327,7 +327,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
||||||
logger->startWork();
|
logger->startWork();
|
||||||
auto outputs = store->queryDerivationOutputMap(path);
|
auto outputs = store->queryDerivationOutputMap(path);
|
||||||
logger->stopWork();
|
logger->stopWork();
|
||||||
write(*store, to, outputs);
|
nix::worker_proto::write(*store, to, outputs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,19 @@ struct Phantom {};
|
||||||
namespace worker_proto {
|
namespace worker_proto {
|
||||||
/* FIXME maybe move more stuff inside here */
|
/* FIXME maybe move more stuff inside here */
|
||||||
|
|
||||||
|
StorePath read(const Store & store, Source & from, Phantom<StorePath> _);
|
||||||
|
void write(const Store & store, Sink & out, const StorePath & storePath);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
std::map<std::string, T> read(const Store & store, Source & from, Phantom<std::map<std::string, T>> _);
|
||||||
|
template<typename T>
|
||||||
|
void write(const Store & store, Sink & out, const std::map<string, T> & resMap);
|
||||||
|
template<typename T>
|
||||||
|
std::optional<T> read(const Store & store, Source & from, Phantom<std::optional<T>> _);
|
||||||
|
template<typename T>
|
||||||
|
void write(const Store & store, Sink & out, const std::optional<T> & optVal);
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::map<std::string, T> read(const Store & store, Source & from, Phantom<std::map<std::string, T>> _)
|
std::map<std::string, T> read(const Store & store, Source & from, Phantom<std::map<std::string, T>> _)
|
||||||
{
|
{
|
||||||
|
@ -122,9 +135,6 @@ void write(const Store & store, Sink & out, const std::optional<T> & optVal)
|
||||||
nix::worker_proto::write(store, out, *optVal);
|
nix::worker_proto::write(store, out, *optVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePath read(const Store & store, Source & from, Phantom<StorePath> _);
|
|
||||||
|
|
||||||
void write(const Store & store, Sink & out, const StorePath & storePath);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue