------- Comment #22 from bangerth at dealii dot org 2006-04-20 14:10 ------- (In reply to comment #17) > Yes, you pick up my operator in Wolfgang's test case. But in the original > submission the vector code is *before* my operators, which are consequently > out > of scope for the STL code
That is factually incorrect, as you can easily check in your code: the declarations involving operator, and hide::inv are in global namespace. Both Paolo and I have come up with small test codes, but they don't seem to to be to your liking. If you insist on there being something wrong, I can only urge you to show us a small piece of code that we can look over, and explain to us why you think that the compiler is wrong. Just waving hands, talking about ADL, claiming that something is wrong, and pointing to a 60,000 line chunk of code isn't going to get us somewhere. Where's the meat? On a different note, as a teacher, I can't help to wonder who in his right mind thought it would be a good idea to come up with code like this: ----------------------- hide::inv operator,(hide::inv l, hide::inv r) { return hide::inv(); } template<typename T> hide::inv operator,(hide::inv l, T t) { return t, hide::inv(); } template<typename T> hide::inv operator,(T t, hide::inv r) { return hide::notAssembler(); } ----------------------- I mean, it's a miracle your code actually does what you expect. From a code design viewpoint, everyone seems to agree that overloading operator, is already a Really Bad Idea (TM), but to do so in global namespace, using templated arguments, and then not even returning the second argument must be something that everyone recognizes as an accident in the making, no? W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26974