Boost logo

Ublas :

From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2005-06-22 21:30:32


Hi all,
Reply (to myself) below.
Best regards, Paul Leopardi

On Thu, 23 Jun 2005 10:29 am, Paul C. Leopardi wrote:
> > In generic code this brakes your portable code criteria. For example
> >
> > template <class V>
> > multA (V& l, const V& r)
> > {
> > l = prod (A, r);
> > }
> >
> > Without knowing it's implementation it is impossible to know if 'multA
> > (y, y)' is correct.
>
> Could this problem be solved by using container concepts or traits? I don't
> know what the most correct or prettiest syntax would be, but maybe a
> Boolean
>
> whatever_traits<T>::CanBeAliased ?
>
> There would need to be a uBLAS header file where known types would be
> assigned a default behaviour. Using the example above,
> whatever_traits< A<B, noalias> >::CanBeAliased would always be false.
>
> I may have no precise idea what I'm talking about, but I think you
> mentioned something in this general ballpark before. See eg,
>
> http://lists.boost.org/MailArchives/boost/msg31900.php

There may be another precedent to this discussion, which is already available
in the Boost libraries: call_traits.

See http://www.boost.org/libs/utility/call_traits.htm

Based on my (incomplete, hazy) understanding of the discussion so far, the use
of call traits (or something like it) could be relevant.