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 12 of 18)
March 2003/C++ Expression Templates

Listing 5: Using the template-based implementation for evaluating (x+2)*3

void someFunction (double x) 
{
  cout 
  << makeProd(makeSum(Variable(x),Literal(2)),Literal(3)).eval() 
  << endl;
}
— 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