Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-07-03 04:38:23

An example that I think demonstrates the superiority of this:

        binary_operation<A,Op,B>::result_type result;

over this:

    result_of_plus<A, B>::type result;

in this directory:

array_calcs.hpp and array_calcs.cpp. The example shows an expression
template for arrays based on the examples in:

(BTW this is part of my next distro so no guarantee it works in pqs-1-01-04
, though should be ok.)

Specifically making the operator a template parameter makes it generic IMHO
and much reduces the work required.
If an expression is required in "typeof" then it cant work generically ,
unless operators are allowed as template params And a generic
"placeholder"operator param is included. (Simple promotion is inadequate for

Simple useage of binary_operation described here:

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at