Please read about the minimal reproducible example and edit your question to add one. (We're missing at least some headers and
template <typename t>
before the first line.) Also add the exact error message you get.