Boost logo

Ublas :

Subject: Re: [ublas] [bindings][lapack] Interface design
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-12-04 13:38:32


Rutger ter Borg wrote:
>
> template< typename T >
> struct vector_traits< left_eigenvector_impl< T > >: unwrap_traits<
> left_eigenvector_impl< T > >{};
>
> template< typename T >
> struct unwrap_traits: vector_traits< typename T::containing_type > {
> typedef vector_traits< typename T::containing_type >::pointer
pointer;
> inline pointer storage( T &v ) {
> // pass reference
> return vector_traits< T::containing_type >::storage( v() );
> }
> // same for size and stride
> };
>

I have problems understanding what unwrap_traits does. I also don't
understand why the member of left_eigenvector_impl must be a
boost::reference_wrapper<T> m_ref instead of a simple T& m_ref.