Boost QVM defines various function templates that provide static mapping between (possibly user-defined) quaternion, vector and matrix types. The example below multiplies column 1 (Boost QVM indexes are always zero-based) of the matrix m by a scalar:
The expression col<1>(m) is a lvalue of an unspecified 3D vector type that refers to column 1 of m. Note however that this does not create any temporary objects; instead operator*= above works directly with a reference to m.
Here is another example, multiplying a transposed view of a matrix by a vector of the user-defined type float3:
In general, the various view functions return references of unspecified, non-copyable types that refer to the original object. They can be assigned from or converted to any compatible vector or matrix type.
For more details, see View Proxies.