
18 Feb
2023
18 Feb
'23
12:33 p.m.
Julien Blanc wrote:
Fixing that was easy, but it made me wonder if the current approach was a good one. I see no reason for partials to be a json_object: they could be anything that maps a string with another (a map<string,string> being a reasonable choice, but it would make sense to also support map<string_view, string_view>).
But they can be. Try it. int main() { std::string template_( "{{>part}}" ); std::map<std::string, std::string> partials{ { "part", "something" } }; boost::mustache::render( template_, std::cout, {}, partials ); }