mirror of
https://github.com/pantor/inja.git
synced 2026-10-30 22:35:43 +00:00
add string_view polyfill
This commit is contained in:
1 parent
5d99c2b703
commit
dbcd5265fc
14 files changed
+2777
-119
No files matched your search
@@ -261,12 +261,12 @@ TEST_CASE("callbacks") {
|
||||
data["age"] = 28;
|
||||
|
||||
env.add_callback("double", 1, [](inja::Arguments& args) {
|
||||
int number = args.at(0)->get<double>();
|
||||
int number = args.at(0)->get<int>();
|
||||
return 2 * number;
|
||||
});
|
||||
|
||||
env.add_callback("half", 1, [](inja::Arguments args) {
|
||||
int number = args.at(0)->get<double>();
|
||||
int number = args.at(0)->get<int>();
|
||||
return number / 2;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user