
2009/11/22 Agustín K-ballo Bergé <kaballo86@hotmail.com>:
Emil Dotchevski escribió:
2009/11/22 Agustín K-ballo Bergé <kaballo86@hotmail.com>:
I should have been more specific, I was expecting the operators to just work for la::vref and la::mref. And probably for any other view too.
Oh, vref/mref and other views will find the operator overloads through ADL. If you have a case where this doesn't work, please post some code and I'll take a look.
#include <boost/la/all.hpp>
int main() { //using namespace boost::la;
float vector[3] = { 1, 2, 3 };
boost::la::vref( vector ) *= 2; ( boost::la::vref( vector ) | boost::la::X ) = 0;
return 0; }
Both operations fail unless `using namespace boost::la`. ADL has nothing to do since vref returns a `boost::la::la_detail::vref_<T>` and operators are defined at `boost::la`.
Ah, yes! I'm sorry I had a brain fart. I'll think what's a good way to fix this, it seems desirable for ADL to lead to the generic operator overloads in this case.
I'm using the version refered to by your original post, is there an update somewhere?
No you're doing everything right. Thanks for the feedback. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode