
Boost : 
From: Pavel Chikulaev (pavel.chikulaev_at_[hidden])
Date: 20050311 01:23:53
"Tobias Schwinger" <tschwinger_at_[hidden]> wrote in message
news:d0qot3
> Can you provide some background information ?
Example one:
same old class Matrix {
Matrix(LAZY_OP((Matrix_ + Matrix_ ) * Matrix_));
Matrix(LAZY_OP(Matrix_ * ( Matrix_ + Matrix_)));
};
//..
Matrix a, b, c, d, e;
e = (a + b) * (c + d);
//What to choose: first or second?
//I mean
//First:
//Matrix t = c + d;
//e = (a + b) * t;
//Second:
//Matrix t = a + b;
//e = t * (c + d);
//My idea is to add unique number to each narity operator
//(some kinda weight of operator), and choose the narity operator
//with maximum value.
//So I really need that max_possible_N_of_all_B_specializations<T>::value.
Example two:
same old class Matrix {
Matrix(LAZY_OP((Matrix_ + Matrix_) * (Matrix_ + Matrix_)));
Matrix(LAZY_OP(Matrix_ * (Matrix_ + Matrix_ * Matrix_))));
};
//..
Matrix a, b, c, d, e, f;
f = (a + b) * (c + d * e);
//Again: First or Second?
 Pavel Chikulaev
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk