Abstract
In this work we discuss usage of expression templates with features of modern C++ language standards. We give an evaluation model for expression templates that accounts for requirements of operator implementation functions. An algorithm for evaluation of expression templates in this model is presented with proof of its optimality. In conclusion we describe implementation methods that are necessary for implementing this algorithm on modern compilers.
Similar content being viewed by others
References
Veldhuizen, T., Expression templates, C++ Rep., 1995, vol. 7, no. 5, pp. 26–31.
FLINT: Fast Library for Number Theory, 2015; http://flintlib.org.
The Blitz++ Library, 2015; http://blitz.sourceforge.net.
Niebler, E., Boost.Proto, 2015; http://www.boost.org/doc/libs/master/doc/html/proto.html.
Falcou, J., shiki: C++11 Modern Take on Expression Templates, 2015; http://github.com/jfalcou/shiki.
ISO/IEC 14882:2014—Information technology—Programming languages—C++, ISO, 2014.
Dionne, L., Boost.Hana: Your Standard Library for Metaprogramming, 2015; https://github.com/ldionne/hana.
Falcou, J., Gottschling, P., and Sutter, H., N4035: Implicit Evaluation of “auto” Variables and Arguments, 2014; http://open-std.org/JTC1/SC22/WG21/docd/papers/2014/n4035.pdf, 2015.
Sussman, G.J. and Steele, G.L., Jr., Scheme: An Interpreter for Extended Lambda Calculus, AI Memo, 1975, vol. 349, p. 19.
Clang: a C Language Family Frontend for LLVM, 2015; http://clang.llvm.org.
Author information
Authors and Affiliations
Corresponding author
Additional information
The article is published in the original.
Rights and permissions
About this article
Cite this article
Lebedev, P.A. Evaluation of expression templates in C++14. Program Comput Soft 42, 142–154 (2016). https://doi.org/10.1134/S0361768816030051
Received:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768816030051