on Thu Jun 21 2007, "Scott, Steven"
w = v/x; // works fine w = x/v; // fails…
I think the failure happens because of the way operator/ defined for mixed types something like this:
T operator/(U u,T t) { T ans(u); ans/=t; return ans; }
which is not what I need. Is there a way I can change the way operator/(double,Vector) works in this one case, but keep the really convenient definitions generated by field_operators otherwise?
Are you sure you want that? I don't think it's meaningful to divide a scalar by a vector. What would the result be? Anyway, if you really do want that, the easy thing to do is add the definition of the overload you want to your class in the usual manual way. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com