| 1368 | |
| 1369 | template <typename Context> |
| 1370 | void arg_map<Context>::init(const basic_format_args<Context>& args) { |
| 1371 | if (map_) return; |
| 1372 | map_ = new entry[internal::to_unsigned(args.max_size())]; |
| 1373 | if (args.is_packed()) { |
| 1374 | for (int i = 0;; ++i) { |
| 1375 | internal::type arg_type = args.type(i); |
| 1376 | if (arg_type == internal::type::none_type) return; |
| 1377 | if (arg_type == internal::type::named_arg_type) |
| 1378 | push_back(args.values_[i]); |
| 1379 | } |
| 1380 | } |
| 1381 | for (int i = 0, n = args.max_size(); i < n; ++i) { |
| 1382 | auto type = args.args_[i].type_; |
| 1383 | if (type == internal::type::named_arg_type) push_back(args.args_[i].value_); |
| 1384 | } |
| 1385 | } |
| 1386 | |
| 1387 | template <typename Char> struct nonfinite_writer { |
| 1388 | sign_t sign; |