
On Tue, 7 Dec 2004 11:45:47 -0500, Arkadiy Vertleyb <vertleyb@hotmail.com> wrote:
"Peder Holt" <peder.holt@gmail.com> wrote in message
... But this is nothing more than what you describe as a "non-deduced context" :( Can't be applied in the general case, but solves the stl iterators problem for selected compilers. Of course, if this doesn't compile with VC7.1, it is of no use anyway.
Right... I am very much surprised it works on VC6...
... Then again, the following compiles with VC7.1, so maybe there is hope after all :) #pragma warning (disable:4786) #include <map> #include <list> #include <iostream> template<typename A0,typename A1> void deduce_container(class std::list<A0,A1>::iterator) { std::cout << "list" << "\n"; } template<typename A0> void deduce_container(class std::_Tree<A0>::iterator) { std::cout << "map" << "\n"; } int main() { std::map<int,double>::iterator a; std::list<int*>::iterator b; deduce_container(a); deduce_container(b); return 0; }
Arkadiy
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost