hughperkins / Jinja2CppLight

(very) lightweight version of Jinja2 for C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use Vector of strings in for loop?

mennahmostafa opened this issue · comments

Is it possible to do something like this:

{% for auto j: myStringVector %}
..
{% endfor %}

I use Lua for everything now. see any of the OpenCL files, *.cl in https://github.com/hughperkins/cltorch/tree/master/src/lib eg https://github.com/hughperkins/cltorch/blob/master/src/lib/THClApply.cl

I've factorized out the lua templater into https://github.com/hughperkins/luacpptemplater

Lua is super lightweight (~46KB or so?), but it's an actual real scripting language. So it's perfect for this. I use it for templating OpenCL kernels, at runtime. It works great. No painpoints :-)