|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-02-18 12:33:10
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 );
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk