On Wed, Sep 9, 2009 at 8:46 AM, Jesse Perla <jesseperla@gmail.com> wrote:
Note the use of the vec() instead of just vec now.  The operator() overloads to return a reference to VectorT from the expression.  (This is called the Barton-Nackman trick).  I believe you could do the following to make the code a little cleaner if you have lots of operations:

Oops, sorry to get fancy.  This is not the Barton-Nackman trick, but something related using the Curiously Recurring Template Pattern...  But the idea above is correct.