fix template

This commit is contained in:
MyskYko 2025-02-12 04:43:15 -08:00
parent 6e3b38c7d3
commit d1d861f703
1 changed files with 5 additions and 5 deletions

View File

@ -73,8 +73,8 @@ namespace rrr {
int AddPi();
int AddPo(int id, bool c);
int AddAnd(int id0, int id1, bool c0, bool c1);
template <typename Ntk>
void Read(Ntk *pFrom, std::function<void(Ntk *, AndNetwork *)> const &Reader);
template <typename Ntk, typename Reader>
void Read(Ntk *pFrom, Reader &reader);
// network properties
bool UseComplementedEdges() const;
@ -287,10 +287,10 @@ namespace rrr {
return nNodes++;
}
template <typename Ntk>
void AndNetwork::Read(Ntk *pFrom, std::function<void(Ntk *, AndNetwork *)> const &Reader) {
template <typename Ntk, typename Reader>
void AndNetwork::Read(Ntk *pFrom, Reader &reader) {
Clear();
Reader(pFrom, this);
reader(pFrom, this);
}
/* }}} */