
18 Feb
2023
18 Feb
'23
1:18 p.m.
Ruben Perez wrote:
On Sat, 18 Feb 2023, 13:34 Peter Dimov via Boost, <boost@lists.boost.org <mailto:boost@lists.boost.org> > wrote:
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 ); }
Does this not copy the map into a json object?
It does.