DEV Community

qiumingming7@gmail.com
qiumingming7@gmail.com

Posted on

Answer: Trouble with dependent types in templates

Well, the warning says:

dependent name is not a type. prefix with 'typename' to indicate a type

The dependent name (that is, the iterator in std::set<result_t>::iterator) is not a type. You need to prefix it with typename to indicate a type:

typename std::set<result_t>::iterator

So, your declaration should be:

template<class

Top comments (0)