Jinja2C++ is a modern C++ implementation of the Python Jinja2 template engine. Originally inspired by Jinja2CppLight library now Jinja2C++ brings support of mostly all Jinja2 templates engine features into C++ world.
- C++14/17 library
- Supports mainstream compilers (Visual C++, gcc, clang)
- Easy-to-use interface.
- Conformance to Jinja2 specification
- Partial support for both narrow- and wide-character strings both for templates and parameters.
- Built-in reflection for C++ types and popular json libraries (nlohmann and rapid)
- Powerful full-featured Jinja2 expressions with filtering (via ‘|’ operator) and ‘if’-expressions.
- Control flow statements (‘set’, ‘filter’, ‘for’, ‘if’, ‘do’, ‘with’).
- Templates extension (‘extends’, ‘block’).
- Templates reuse (‘include’, ‘import’, ‘from’)
- Macros (‘macro’, ‘call’).
- Rich error reporting.
The simplest way: to get the latest conan.io package: jinja2cpp/0.9.1@Manu343726/testing
Or follow the build and install instructions
Jinja2C++ is © 2018-2019 by Flex Ferrum.
Jinja2C++ is distributed by an Mozilla Public License 2.0.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Thanks to authors of original Jinja2 specification for the exceptional work!
Thanks to manu343726 for CMake scripts improvement, conan.io packaging and bugs hunting and fixing.
Thanks to martinmoene for perfectly implemented xxx-lite libraries.
Thanks to vitaut for the amazing text formatting library.
Thanks to martinus for the fast hash maps implementation.
File src/lexertk.h Originally copyright © 2001 by Arash Partow