| |
| | Copy constructor called from member function? |
 | | Programming Forum and web based access to our favorite programming groups. |
 | | Specifically when using my own += operator defined as: template mgMatrix operator+=(S scalar) { std::transform(begin(), end(), begin(), std::bind2nd(std::plus(), scalar)); return *this; }; During testing, T=int and S=int (I use two types here to allow int scalars to be added to double matrices), and scalar=0. |
 | | Specifically when using my own += > operator defined as: > > template mgMatrix operator+=(S scalar) { > std::transform(begin(), end(), begin(), std::bind2nd(std::plus(), > scalar)); return *this; }; > > During testing, T=int and S=int (I use two types here to allow int > scalars to be added to double matrices), and scalar=0. |
| www.codecomments.com /message266636.html (931 words) |
|