Abstract

C++ template metaprogramming is often regarded as a functional language, however, nowadays metaprogram libraries are not implemented in functional programming style. In this paper we discuss a compile-time graph-rewriting engine based on the properties of the functional language Clean. The most important property imported from the functional paradigm is the lazy evaluation strategy. With the help of the engine it is possible to embed lazy functional-style code into C++ programs, and transform it into template metaprograms. We present the implemented lazy evaluation strategy by examples including also infinite lists.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.