Eric Poggel wrote:
On 4/19/2010 6:43 AM, Lars T. Kyllingstad wrote:
IMO, general vectors/matrices should be structs wrapping a pointer to
the data:

   struct Vector(T)
   {
      T* ptr;
      size_t length;
      size_t stride;
   }

Low-dimensional fixed-size vectors should probably be value types.

I think it would be confusing to have some vectors as value and others as reference types, unless they were different types in the library itself.

That was the idea, to have *both* a generic Vector(T) type and specialised Vector2D(T) and Vector3D(T) types.

-Lars

Reply via email to