BOOST_FOREACH does not work inside template?
===

I tried to use BOOST_FOREACH inside a template function with a custom, but type parameter independent iterator. I get 4-5 errors suggesting that my iterator class is not well defined as an iterator.

Rewriting the loop without BOOST_FOREACH, or "un-templatizing" the function makes the errors go away.

Is this a known limitation of BOOST_FOREACH?