Convert TinyVector to std::array (C++11)
It seems that TinyVector and std::array do the same thing. So consider typedefing one to the other when using a C++11 compiler.
Unless I'm mistaken, std::array does not define any math operators. That said, it might be possible to usefully leverage it as the backend to TinyVector.
In using blitz::Array, I'm doing too many unnecessary conversions between std::array and TinyVector. We can define the math operations externally to the class. But yes, it seems that simple typedef won't work.
On Tue, Jan 19, 2016 at 2:35 PM, lutorm [email protected] wrote:
Unless I'm mistaken, std::array does not define any math operators. That said, it might be possible to usefully leverage it as the backend to TinyVector.
— Reply to this email directly or view it on GitHub https://github.com/blitzpp/blitz/issues/10#issuecomment-172961519.
Maybe the solution is to add an implicit constructor to TinyVector from std::array. The "needless" conversion would still be happening. But it would now be under the hood and we probably won't care. This would be a more backwards-compatible way of doing things.
On Tue, Jan 19, 2016 at 2:42 PM, Elizabeth Fischer [email protected] wrote:
In using blitz::Array, I'm doing too many unnecessary conversions between std::array and TinyVector. We can define the math operations externally to the class. But yes, it seems that simple typedef won't work.
On Tue, Jan 19, 2016 at 2:35 PM, lutorm [email protected] wrote:
Unless I'm mistaken, std::array does not define any math operators. That said, it might be possible to usefully leverage it as the backend to TinyVector.
— Reply to this email directly or view it on GitHub https://github.com/blitzpp/blitz/issues/10#issuecomment-172961519.