Skip to main content
Log in

Evaluation of expression templates in C++14

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Veldhuizen, T., Expression templates, C++ Rep., 1995, vol. 7, no. 5, pp. 26–31.

    Google Scholar 

  2. FLINT: Fast Library for Number Theory, 2015; http://flintlib.org.

    Google Scholar 

  3. The Blitz++ Library, 2015; http://blitz.sourceforge.net.

  4. Niebler, E., Boost.Proto, 2015; http://www.boost.org/doc/libs/master/doc/html/proto.html.

    Google Scholar 

  5. Falcou, J., shiki: C++11 Modern Take on Expression Templates, 2015; http://github.com/jfalcou/shiki.

    Google Scholar 

  6. ISO/IEC 14882:2014—Information technology—Programming languages—C++, ISO, 2014.

  7. Dionne, L., Boost.Hana: Your Standard Library for Metaprogramming, 2015; https://github.com/ldionne/hana.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. Sussman, G.J. and Steele, G.L., Jr., Scheme: An Interpreter for Extended Lambda Calculus, AI Memo, 1975, vol. 349, p. 19.

    Google Scholar 

  10. Clang: a C Language Family Frontend for LLVM, 2015; http://clang.llvm.org.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to P. A. Lebedev.

Additional information

The article is published in the original.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768816030051

Keywords

Navigation