Commit Graph

431 Commits

Author SHA1 Message Date
pantor
80005c19b5 disable implicit conversions in test 2021-11-17 10:42:45 +01:00
pantor
ab6d006443 works with JSON_NO_IO 2021-11-17 10:39:53 +01:00
pantor
dc3451173f revert to nlohmann json 3.9.1 2021-11-17 10:39:30 +01:00
pantor
54a2606885 bump to nlohmann/json 3.10.4 2021-11-17 10:11:20 +01:00
pantor
eb04bfc7d3 clang-format 2021-11-12 08:35:56 +01:00
pantor
81cfa140e4 init LiteralNode with string view, code cleaning 2021-11-12 08:13:42 +01:00
pantor
2da715a12a parse_filename without json 2021-11-12 08:06:56 +01:00
pantor
623c267383 make_result and code cleaning 2021-11-11 22:05:21 +01:00
pantor
120691339d rename json -> data 2021-11-10 12:53:27 +01:00
pantor
d38c07ec5b clang 5 minimum 2021-11-10 12:35:03 +01:00
pantor
a067a8b06e make all tests C++17 2021-11-10 12:28:06 +01:00
pantor
098de66b4e inja_test C++17 2021-11-10 12:24:24 +01:00
pantor
173c1f5f7d fix C++17 2021-11-10 12:17:26 +01:00
pantor
2239e231bc remove string view polyfill 2021-11-10 12:14:54 +01:00
pantor
fb55f2e5fe update minimum compiler 2021-11-10 12:03:54 +01:00
pantor
751d27d341 fix MIT license 2021-10-26 14:42:56 +02:00
pantor
635e1fb183 change readme example 2021-09-07 10:08:28 +02:00
pantor
5a4ac92137 update single include 2021-09-07 10:01:52 +02:00
pantor
d038c53388 set .cpp in readme 2021-09-07 10:01:09 +02:00
pantor
cf71b54151 add include callback 2021-09-07 10:00:33 +02:00
pantor
9b9dd96a46 introduce INJA_DATA_TYPE 2021-09-06 09:15:48 +02:00
pantor
12a2c9bbf2 unify json data type 2021-09-01 16:40:43 +02:00
pantor
4505fd0508 add tests for assignments 2021-09-01 10:29:52 +02:00
pantor
2d515078c6 set version 3.3 v3.3.0 2021-07-28 16:38:53 +02:00
pantor
2ba5783705 Merge branch 'master' of github.com:pantor/inja 2021-07-25 14:24:51 +02:00
pantor
99b85d69e7 remove headers in files, add central header 2021-07-25 14:24:49 +02:00
逐雁南飛
14f0d38cac Fixed an issue with round (#207)
* Fix the problem that the result has a decimal point when the round function, when the precision is 0.

* fix tests/test-functions.cpp:91 for round check
2021-07-01 07:59:00 +02:00
pantor
c70fd585e5 Merge branch 'master' of github.com:pantor/inja 2021-06-30 19:56:19 +02:00
pantor
8a9aee1257 add jinja python test script 2021-06-30 19:56:16 +02:00
Wim Leflere
91c93bfb77 add join function (#204)
* add join function

* fix formatting to match single include

* add join test

* add join to documentation

* fix MSVC warning: signed/unsigned mismatch

Co-authored-by: Wim Leflere <wleflere@cochlear.com>
2021-06-17 20:54:22 +02:00
pantor
9cf7db8a06 add warnings for benchmark, fix for inja_throw 2021-06-17 20:03:40 +02:00
pantor
e91a2fd350 #ifndef INJA_THROW 2021-06-17 19:56:22 +02:00
pantor
8d65633b6a add warnings for clang and fix them 2021-06-17 19:48:28 +02:00
pantor
eaec58d8aa update nlohmann/json to master 2021-06-10 08:06:16 +02:00
pantor
4ccadd57ac update to json=3.9.1, doctest=2.4.6 2021-06-09 22:31:50 +02:00
pantor
83feb26219 update single include 2021-06-09 22:26:32 +02:00
pantor
4e909475ea at function for objects 2021-06-09 22:26:07 +02:00
pantor
b473873853 compactify assignments readme 2021-06-09 21:41:00 +02:00
Bryce Adelstein Lelbach aka wash
798a0b92b1 Add support for setting subobjects via JSON pointer in set statements. (#202)
E.g. `{% set x.y = 1 %}` sets the `y` member of `x` to 1.
2021-06-09 21:39:16 +02:00
pantor
86f38f05d7 update single include 2021-06-09 21:34:03 +02:00
pantor
d9ad8d195b whitespace control for comments 2021-06-09 21:33:47 +02:00
pantor
95af782ca2 Add Child Inheritance Feature (#198)
* add block and extend feature

* constify, code cleaning

* update single include

* add html language to readme

* clean tests

* constantify, update year
2021-05-25 10:18:21 +02:00
Wim Leflere
b4b9d8dc16 Fix build warnings for Clang and MSVC (#197)
* remove unnecessary semicolons on function definitions

* add virtual destructor to base class

* fix possible loss of data warning for double to int conversion with explicit cast

* ignore Visual Studio build folder

Co-authored-by: Wim Leflere <wleflere@cochlear.com>
2021-05-20 12:40:57 +02:00
pantor
b14f8a1e3a add ci for gcc 10, 11 2021-05-19 20:16:00 +02:00
pantor
06ff2711cf add no excpetion test 2021-05-19 20:09:40 +02:00
Chinmay Garde
2491980b23 Fix inclusion in translation units with exceptions disabled. (#196)
If exceptions are disabled via `-fno-exceptions` or `INJA_NOEXCEPTION`, the use
of try-catch is disallowed by the compiler.

This patch makes does two things:
* Gates the use of try-catch in one translation unit on the definition of
  `INJA_NOEXCEPTION`.
* Make it such that translation units compiled with `-fno-exceptions` but no
  `INJA_NOEXCEPTION` implicitly sets `INJA_NOEXCEPTION`.

In the specific case of `ifstream::open`, setting the exceptions bits without
exceptions enabled should trip an assertion just like INJA_ABORT. The nice
message will not be present however, but that is absent when using INJA_ABORT as
well.

After this patch, inja can be successfully included without issue.
2021-05-19 19:53:55 +02:00
pantor
4d5a7d1c33 fix single include 2021-05-17 20:44:48 +02:00
pantor
eac2162629 fix include of in-memory templates 2021-05-17 20:44:32 +02:00
pantor
ca3c7a0cd6 add test for short circuit evaluation 2021-05-17 20:03:17 +02:00
pantor
389c1d64f0 short circuit evaluation 2021-05-17 19:57:33 +02:00