id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6626,shallow_array_adaptor bug in swap function,Guillermo Ruiz Troyano ,Gunter,"''boost::numeric::ublas::vector< T,shallow_array_adaptor >'' fails when it is assigned with an expression. For example: {{{ #define BOOST_UBLAS_SHALLOW_ARRAY_ADAPTOR #include struct point { double x; double y; double z; }; void test() { using namespace boost::numeric::ublas; point p = { 1, 2, 3 } shallow_array_adaptor a(3, &p.x); // Ok, a holds p address vector > v(a); // Ok, v holds p address v += v; // Ok, now p = { 2, 4, 6 } v /= 2; // Ok, now p = { 1, 2, 3 } v = v*2; // <- Oh no, p = { 1, 2, 3 } !!! } }}} ''vector'' creates a temporary object and it calls to ''shallow_array_adaptor::swap''. This function doesn't check if it is the owner of pointers to swap. When both are data owners can do that (as unbounded_array does). But if they are not then they should swap as bounded_array does.",Bugs,new,Boost 1.50.0,uBLAS,Boost 1.49.0,Problem,,boost::numeric::ublas::shallow_array_adaptor,