Boost logo

Ublas :

Subject: Re: [ublas] [bindings][traits] Stricter traits
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-04-28 04:51:44


Karl Meerbergen wrote:
   
>
> This specialization would exist, but not be useful in any bindings.
>

Please find attached an example of the proposed change I have in mind for
the free functions. The example obsoletes the vector-as-matrix headers in
the traits directory. Using the proposed system enables us to introduce
decorators such as trans_ etc.

I guess this stuff would imply that there's a layer between the user-traits-
function(s) and the matrix_traits<> and vector_traits<> classes. I.e., most
of the property-functionality (e.g., matrix_traits<T>::some_property) would
get its own metafunction. E.g., value_type<M>::type would work for both
matrices and vectors. And we would have to write

matrix_structure<M>::type

versus

matrix_traits<M>::matrix_structure

Thoughts?

Cheers,

Rutger