Understanding C++ Expression Templates - Angelika Langer
Understanding C++ Expression Templates - Angelika Langer
Understanding C++ Expression Templates - Angelika Langer
- 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.
33Incorporating FunctionsWe can incorporate functions such as sqrt(), exp(), etc.:template UnaryExprsqrt(const ExprT& e){return UnaryExpr(e,::std::sqrt);}and calculate the Gauss distribution:double sigma=2.0, mean=5.0;const double Pi = 3.141593;cout