11.07.2015 Views

Understanding C++ Expression Templates - Angelika Langer

Understanding C++ Expression Templates - Angelika Langer

Understanding C++ Expression Templates - Angelika Langer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6ResultGiven N, compute a compile-time table size ceil(sqrtsqrt(N))(N))!Example:int table[Root::root];1 4 5 10RootRootRootRoot© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(11)last update: 11/7/2005 ,21:37! compile-time computation of constant values– factorial– square root! compile-time evaluation of expressions– dot product– arithmetic expression! more examples of modern template programming– compile-time polymorphism– policy classes– template meta-programmingAgenda© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(12)last update: 11/7/2005 ,21:37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!