expression templates

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Mar 30 13:27:01 PDT 2011


On 30.03.2011 1:02, bearophile wrote:
>   the second operand often is not a set, so I can't use operators.
How's that ?
Implementing simplistic vector struct I made * to work on both vectors 
(meaning dot product) and scalars (meaning scaling).
Template constraints + opBinaryRight for the win!
P.S. Though I'd prefer separate functions for that dot and cross product.

-- 
Dmitry Olshansky



More information about the Digitalmars-d mailing list