FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
March 01, 2003

C++ Expression Templates

(Page 8 of 18)
March 2003/C++ Expression Templates

Listing 11: Adding creator functions for each unary or binary expression

template  <class ExprT>
UnaryExpr<ExprT,double(*)(double)>
sqrt(const ExprT& e) 
{return UnaryExpr<ExprT,double(*)(double)>(e,::std::sqrt);}

template  <class ExprT>
UnaryExpr<ExprT,double(*)(double)>
exp(const ExprT& e) 
{ return UnaryExpr<ExprT,double(*)(double)>(e,::std::exp); }

...
— End of Listing —
Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK