Boost logo

Ublas :

Subject: Re: [ublas] [bindings] matrix traits
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-01-15 16:05:19

Rutger ter Borg wrote:
> With respect to the traits systems, to get a binding working,
> I have to add the following includes:
> #include <boost/numeric/bindings/traits/type.hpp>
> #include <boost/numeric/bindings/traits/traits.hpp>
> #include <boost/numeric/bindings/traits/type_traits.hpp>

I think you can omit type.hpp.

> Is this the recommended way to get access to all goods needed for bindings?

The answer is probably yes for lapack, judging based on the existing code base. I also see sparse_traits.hpp, which doesn't get included in this way, but is not needed for lapack.

> It could be me, but the similar nature of the naming of these three get me
> confused as to what these files are supposed to do and/or include.

I guess it's OK that type_traits.hpp includes type.h and type.hpp. So the question revolves around traits.hpp. All traits.hpp does is to include vector_traits.hpp and matrix_traits.hpp, and you are wondering whether it should also include type_traits.hpp. Its name suggests to me that it could include it, but I don't know whether it is supposed to include it.

I think it would be reasonable to change traits.hpp to also include type_traits.hpp, and change all code that includes traits.hpp but don't want to include type_traits.hpp to directly include vector_traits.hpp and matrix_traits.hpp.