【发布时间】:2018-05-10 09:55:22
【问题描述】:
如何使用std::num_put 将数字写入自定义迭代器(例如std::back_insert_iterator<std::string>)?
std::string s;
using I = decltype(std::back_inserter(s));
auto& f = std::use_facet<std::num_put<char, I>>(std::locale());
f.put(std::back_inserter(s), /* what do I pass here? */, ' ', 5.6);
【问题讨论】: