Why is the keyword template necessary in the following specialization?
Hi,
What does template before value_of<Iterator> do?
1 2 3 4 5 6
|
template <>
struct value_of_impl<iterator_facade_tag>
{
template <typename Iterator>
struct apply : Iterator::template value_of<Iterator> {};
};
|
When is it necessary?
Thanks
Juan
http://stackoverflow.com/a/613132/854133 -- you need it when the syntax is otherwise ambiguous.
Unless your brain processes C++ like a compiler, you know it's needed when your compiler tells you it is needed.
Great answer!!
Thanks
Juan
Topic archived. No new replies allowed.