# QVM: Quaternions, Vectors, Matrices

### boost/qvm/vec_traits.hpp

This header defines the vec_traits template which can be specialized to register user-defined vector types into Boost QVM.

### Synopsis:

#include <boost/qvm/vec_traits.hpp>

    namespace boost
    {
        namespace qvm
        {
            template <class T>
            struct is_vec
            {
                static bool const value=/*unspecified*/;
            };

            template <class V>
            struct vec_traits
            {
                /*main template members unspecified*/
            };

            /*
            User-defined (possibly partial) specializations:

            template <>
            struct vec_traits<V>
            {
                static int const dim = /*user-defined*/;
                typedef /*user-defined*/ scalar_type;

                template <int I> static inline scalar_type read_element( Vector const & v );
                template <int I> static inline scalar_type & write_element( Vector & v );

                static inline scalar_type read_element_idx( int i, Vector const & v );
                static inline scalar_type & write_element_idx( int i, Vector & v );
            };
            */
        }
    }

See also: is_vec | vec_traits