I'm still trying to find my way with the library, but when looking at examples of how to use it in the tests, I did some attempts and I got something very strange to me:
using namespace bustache;
context cont = {{"include", "{{$person}}customer{{/person}}"_fmt}};
auto x = "Greetings {{<include}} IGNORED {{$person}}Alice{{/person}}{{/include}}"_fmt(nullptr);
std::cout << "1 " << x.context(cont) << std::endl;
auto y = "Greetings {{<include}} IGNORED {{$person}}Alice{{/person}}{{/include}}"_fmt;
std::cout << "2 " << y(nullptr).context(cont) << std::endl;
I get:
1
2 Greetings Alice
And I doing something wrong? I don't see why one usage should be different from the other, though I'm not familiar with the types returned in each case.
I'm still trying to find my way with the library, but when looking at examples of how to use it in the tests, I did some attempts and I got something very strange to me:
I get:
And I doing something wrong? I don't see why one usage should be different from the other, though I'm not familiar with the types returned in each case.
Thank you.