Boost LA

boost/la/array_vector_traits.hpp

This header introduces specializations of the vector_traits, deduce_vector and deduce_vector2 templates that make it possible to pass C arrays to any Boost LA function that takes a vector of matching size.

For example, to compute the dot product of two C arrays, you could use:

float a[4], b[4];
float dp = dot(a,b);

To use Boost LA operator overloads, at least one of the arguments must not be of a built-in type; for example you can't multiply a C array vector by a scalar by using operator*= directly. Use vref to work around this issue:

float a[4];
vref(a) *= 42;