if I have a class that's templated, and has a single templated constructor:
template <typename Tdst>
struct memsrc {
template <typename Tsrc>
memsrc(const Tsrc *src, ssize_t len);
};
And I have an instance of the class in another class that's also similarly templated:
template <typename Tdst>
struct other {
template <typename Tsrc>
other();
memsrc<Tdst> src_;
};
And I want to initialize src_ in the constructor of other, how do I do that? This:
src_ = memsrc<Tdst>::memsrc<Tsrc>(nullptr, 0);
Doesn't work:
rawio.h: In constructor ‘filesrc<Tdst>::filesrc(rawfile*)’:
rawio.h:578:49: error: expected primary-expression before ‘>’ token
mmapsrc_ = memsrc<Tdst>::memsrc<Tsrc>(mmap_.ptr(), mmap_.size());