
AlisdairM wrote:
AlisdairM wrote:
I tried using const ref for U initially, but that gives ambiguity errors.
This does not solve all problems, but seems a reasonable first step.
In fact, it solves most the problems apart from the array and string cases, which I think are the familiar Borland pointer decay issues. Did these ever work with a previous version of for_each? If so, how did you solve pointer-decay issues then?
Wonderful. In fact, I don't think the elipses are needed at all, so a better patch would be to simply replace the ... with boost::foreach::tag and let overload resolution do its thing. I know at one point, BOOST_FOREACH worked on Borland with arrays and strings. I remember the pain, and see the vestigal work-arounds still in the code. We can confirm with the version from November once CVS is back up.) -- Eric Niebler Boost Consulting www.boost-consulting.com