|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-07-15 09:07:19
From: "Toon Knapen" <toon.knapen_at_[hidden]>
> > [dwa] You might consider including a constant called "_" which stands
in
> > for range::all().
> Probably this is too short. In that case, two underscores would be
better.
But illegal. It's reserved to the C++ implementation.
> > Personally, it's still all Greeek to me ;-)
> well, this is a real-life example not some textbook example. That's also
the
> reason that I'm bringing it up, it's important too look how ublas is used
in
> real-life LA codes.
> Feel free to suggest some other/more syntax simplifications ?
I wish I could. I really wish we could use colon notation in C++.
I don't think we have enough operators available to make this any prettier.
> > Why is an .assign() member function being used instead of operator= ?
> > I thought uBlas had expression templates!?
>
> AFAIK, the assign assumes that there's no aliasing between lhs and rhs.
> Otherwise the rhs will first be stored in a temporary.
Ah, thanks.
One idea to consider:
x.assign() = blah blah blah
would at least set the LHS off from the rhs a little better.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk