Agora  1.2.0
Agora project
compile.h
Go to the documentation of this file.
1 // Formatting library for C++ - experimental format string compilation
2 //
3 // Copyright (c) 2012 - present, Victor Zverovich and fmt contributors
4 // All rights reserved.
5 //
6 // For the license information refer to format.h.
7 
8 #ifndef FMT_COMPILE_H_
9 #define FMT_COMPILE_H_
10 
11 #include "format.h"
12 
14 namespace detail {
15 
16 // An output iterator that counts the number of objects written to it and
17 // discards them.
19  private:
20  size_t count_;
21 
22  public:
23  using iterator_category = std::output_iterator_tag;
24  using difference_type = std::ptrdiff_t;
25  using pointer = void;
26  using reference = void;
27  using _Unchecked_type = counting_iterator; // Mark iterator as checked.
28 
29  struct value_type {
30  template <typename T> void operator=(const T&) {}
31  };
32 
33  counting_iterator() : count_(0) {}
34 
35  size_t count() const { return count_; }
36 
38  ++count_;
39  return *this;
40  }
42  auto it = *this;
43  ++*this;
44  return it;
45  }
46 
48  it.count_ += static_cast<size_t>(n);
49  return it;
50  }
51 
52  value_type operator*() const { return {}; }
53 };
54 
55 template <typename Char, typename InputIt>
56 inline counting_iterator copy_str(InputIt begin, InputIt end,
57  counting_iterator it) {
58  return it + (end - begin);
59 }
60 
61 template <typename OutputIt> class truncating_iterator_base {
62  protected:
63  OutputIt out_;
64  size_t limit_;
65  size_t count_ = 0;
66 
67  truncating_iterator_base() : out_(), limit_(0) {}
68 
69  truncating_iterator_base(OutputIt out, size_t limit)
70  : out_(out), limit_(limit) {}
71 
72  public:
73  using iterator_category = std::output_iterator_tag;
75  using difference_type = std::ptrdiff_t;
76  using pointer = void;
77  using reference = void;
78  using _Unchecked_type =
79  truncating_iterator_base; // Mark iterator as checked.
80 
81  OutputIt base() const { return out_; }
82  size_t count() const { return count_; }
83 };
84 
85 // An output iterator that truncates the output and counts the number of objects
86 // written to it.
87 template <typename OutputIt,
88  typename Enable = typename std::is_void<
91 
92 template <typename OutputIt>
93 class truncating_iterator<OutputIt, std::false_type>
94  : public truncating_iterator_base<OutputIt> {
96 
97  public:
99 
100  truncating_iterator() = default;
101 
102  truncating_iterator(OutputIt out, size_t limit)
103  : truncating_iterator_base<OutputIt>(out, limit) {}
104 
106  if (this->count_++ < this->limit_) ++this->out_;
107  return *this;
108  }
109 
111  auto it = *this;
112  ++*this;
113  return it;
114  }
115 
117  return this->count_ < this->limit_ ? *this->out_ : blackhole_;
118  }
119 };
120 
121 template <typename OutputIt>
122 class truncating_iterator<OutputIt, std::true_type>
123  : public truncating_iterator_base<OutputIt> {
124  public:
125  truncating_iterator() = default;
126 
127  truncating_iterator(OutputIt out, size_t limit)
128  : truncating_iterator_base<OutputIt>(out, limit) {}
129 
130  template <typename T> truncating_iterator& operator=(T val) {
131  if (this->count_++ < this->limit_) *this->out_++ = val;
132  return *this;
133  }
134 
135  truncating_iterator& operator++() { return *this; }
136  truncating_iterator& operator++(int) { return *this; }
137  truncating_iterator& operator*() { return *this; }
138 };
139 
140 // A compile-time string which is compiled into fast formatting code.
142 
143 template <typename S>
144 struct is_compiled_string : std::is_base_of<compiled_string, S> {};
145 
159 #if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
160 # define FMT_COMPILE(s) \
161  FMT_STRING_IMPL(s, fmt::detail::compiled_string, explicit)
162 #else
163 # define FMT_COMPILE(s) FMT_STRING(s)
164 #endif
165 
166 #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
167 template <typename Char, size_t N,
168  fmt::detail_exported::fixed_string<Char, N> Str>
169 struct udl_compiled_string : compiled_string {
170  using char_type = Char;
171  constexpr operator basic_string_view<char_type>() const {
172  return {Str.data, N - 1};
173  }
174 };
175 #endif
176 
177 template <typename T, typename... Tail>
178 const T& first(const T& value, const Tail&...) {
179  return value;
180 }
181 
182 #if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
183 template <typename... Args> struct type_list {};
184 
185 // Returns a reference to the argument at index N from [first, rest...].
186 template <int N, typename T, typename... Args>
187 constexpr const auto& get([[maybe_unused]] const T& first,
188  [[maybe_unused]] const Args&... rest) {
189  static_assert(N < 1 + sizeof...(Args), "index is out of bounds");
190  if constexpr (N == 0)
191  return first;
192  else
193  return detail::get<N - 1>(rest...);
194 }
195 
196 template <typename Char, typename... Args>
197 constexpr int get_arg_index_by_name(basic_string_view<Char> name,
198  type_list<Args...>) {
199  return get_arg_index_by_name<Args...>(name);
200 }
201 
202 template <int N, typename> struct get_type_impl;
203 
204 template <int N, typename... Args> struct get_type_impl<N, type_list<Args...>> {
205  using type =
206  remove_cvref_t<decltype(detail::get<N>(std::declval<Args>()...))>;
207 };
208 
209 template <int N, typename T>
210 using get_type = typename get_type_impl<N, T>::type;
211 
212 template <typename T> struct is_compiled_format : std::false_type {};
213 
214 template <typename Char> struct text {
215  basic_string_view<Char> data;
216  using char_type = Char;
217 
218  template <typename OutputIt, typename... Args>
219  constexpr OutputIt format(OutputIt out, const Args&...) const {
220  return write<Char>(out, data);
221  }
222 };
223 
224 template <typename Char>
225 struct is_compiled_format<text<Char>> : std::true_type {};
226 
227 template <typename Char>
228 constexpr text<Char> make_text(basic_string_view<Char> s, size_t pos,
229  size_t size) {
230  return {{&s[pos], size}};
231 }
232 
233 template <typename Char> struct code_unit {
234  Char value;
235  using char_type = Char;
236 
237  template <typename OutputIt, typename... Args>
238  constexpr OutputIt format(OutputIt out, const Args&...) const {
239  return write<Char>(out, value);
240  }
241 };
242 
243 // This ensures that the argument type is convertible to `const T&`.
244 template <typename T, int N, typename... Args>
245 constexpr const T& get_arg_checked(const Args&... args) {
246  const auto& arg = detail::get<N>(args...);
247  if constexpr (detail::is_named_arg<remove_cvref_t<decltype(arg)>>()) {
248  return arg.value;
249  } else {
250  return arg;
251  }
252 }
253 
254 template <typename Char>
255 struct is_compiled_format<code_unit<Char>> : std::true_type {};
256 
257 // A replacement field that refers to argument N.
258 template <typename Char, typename T, int N> struct field {
259  using char_type = Char;
260 
261  template <typename OutputIt, typename... Args>
262  constexpr OutputIt format(OutputIt out, const Args&... args) const {
263  return write<Char>(out, get_arg_checked<T, N>(args...));
264  }
265 };
266 
267 template <typename Char, typename T, int N>
268 struct is_compiled_format<field<Char, T, N>> : std::true_type {};
269 
270 // A replacement field that refers to argument with name.
271 template <typename Char> struct runtime_named_field {
272  using char_type = Char;
273  basic_string_view<Char> name;
274 
275  template <typename OutputIt, typename T>
276  constexpr static bool try_format_argument(
277  OutputIt& out,
278  // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9
279  [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) {
280  if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) {
281  if (arg_name == arg.name) {
282  out = write<Char>(out, arg.value);
283  return true;
284  }
285  }
286  return false;
287  }
288 
289  template <typename OutputIt, typename... Args>
290  constexpr OutputIt format(OutputIt out, const Args&... args) const {
291  bool found = (try_format_argument(out, name, args) || ...);
292  if (!found) {
293  FMT_THROW(format_error("argument with specified name is not found"));
294  }
295  return out;
296  }
297 };
298 
299 template <typename Char>
300 struct is_compiled_format<runtime_named_field<Char>> : std::true_type {};
301 
302 // A replacement field that refers to argument N and has format specifiers.
303 template <typename Char, typename T, int N> struct spec_field {
304  using char_type = Char;
305  formatter<T, Char> fmt;
306 
307  template <typename OutputIt, typename... Args>
308  constexpr FMT_INLINE OutputIt format(OutputIt out,
309  const Args&... args) const {
310  const auto& vargs =
311  fmt::make_format_args<basic_format_context<OutputIt, Char>>(args...);
312  basic_format_context<OutputIt, Char> ctx(out, vargs);
313  return fmt.format(get_arg_checked<T, N>(args...), ctx);
314  }
315 };
316 
317 template <typename Char, typename T, int N>
318 struct is_compiled_format<spec_field<Char, T, N>> : std::true_type {};
319 
320 template <typename L, typename R> struct concat {
321  L lhs;
322  R rhs;
323  using char_type = typename L::char_type;
324 
325  template <typename OutputIt, typename... Args>
326  constexpr OutputIt format(OutputIt out, const Args&... args) const {
327  out = lhs.format(out, args...);
328  return rhs.format(out, args...);
329  }
330 };
331 
332 template <typename L, typename R>
333 struct is_compiled_format<concat<L, R>> : std::true_type {};
334 
335 template <typename L, typename R>
336 constexpr concat<L, R> make_concat(L lhs, R rhs) {
337  return {lhs, rhs};
338 }
339 
340 struct unknown_format {};
341 
342 template <typename Char>
343 constexpr size_t parse_text(basic_string_view<Char> str, size_t pos) {
344  for (size_t size = str.size(); pos != size; ++pos) {
345  if (str[pos] == '{' || str[pos] == '}') break;
346  }
347  return pos;
348 }
349 
350 template <typename Args, size_t POS, int ID, typename S>
351 constexpr auto compile_format_string(S format_str);
352 
353 template <typename Args, size_t POS, int ID, typename T, typename S>
354 constexpr auto parse_tail(T head, S format_str) {
355  if constexpr (POS !=
356  basic_string_view<typename S::char_type>(format_str).size()) {
357  constexpr auto tail = compile_format_string<Args, POS, ID>(format_str);
358  if constexpr (std::is_same<remove_cvref_t<decltype(tail)>,
359  unknown_format>())
360  return tail;
361  else
362  return make_concat(head, tail);
363  } else {
364  return head;
365  }
366 }
367 
368 template <typename T, typename Char> struct parse_specs_result {
369  formatter<T, Char> fmt;
370  size_t end;
371  int next_arg_id;
372 };
373 
374 constexpr int manual_indexing_id = -1;
375 
376 template <typename T, typename Char>
377 constexpr parse_specs_result<T, Char> parse_specs(basic_string_view<Char> str,
378  size_t pos, int next_arg_id) {
379  str.remove_prefix(pos);
380  auto ctx = basic_format_parse_context<Char>(str, {}, next_arg_id);
381  auto f = formatter<T, Char>();
382  auto end = f.parse(ctx);
383  return {f, pos + fmt::detail::to_unsigned(end - str.data()) + 1,
384  next_arg_id == 0 ? manual_indexing_id : ctx.next_arg_id()};
385 }
386 
387 template <typename Char> struct arg_id_handler {
388  arg_ref<Char> arg_id;
389 
390  constexpr int operator()() {
391  FMT_ASSERT(false, "handler cannot be used with automatic indexing");
392  return 0;
393  }
394  constexpr int operator()(int id) {
395  arg_id = arg_ref<Char>(id);
396  return 0;
397  }
398  constexpr int operator()(basic_string_view<Char> id) {
399  arg_id = arg_ref<Char>(id);
400  return 0;
401  }
402 
403  constexpr void on_error(const char* message) {
404  FMT_THROW(format_error(message));
405  }
406 };
407 
408 template <typename Char> struct parse_arg_id_result {
409  arg_ref<Char> arg_id;
410  const Char* arg_id_end;
411 };
412 
413 template <int ID, typename Char>
414 constexpr auto parse_arg_id(const Char* begin, const Char* end) {
415  auto handler = arg_id_handler<Char>{arg_ref<Char>{}};
416  auto arg_id_end = parse_arg_id(begin, end, handler);
417  return parse_arg_id_result<Char>{handler.arg_id, arg_id_end};
418 }
419 
420 template <typename T, typename Enable = void> struct field_type {
421  using type = remove_cvref_t<T>;
422 };
423 
424 template <typename T>
425 struct field_type<T, enable_if_t<detail::is_named_arg<T>::value>> {
426  using type = remove_cvref_t<decltype(T::value)>;
427 };
428 
429 template <typename T, typename Args, size_t END_POS, int ARG_INDEX, int NEXT_ID,
430  typename S>
431 constexpr auto parse_replacement_field_then_tail(S format_str) {
432  using char_type = typename S::char_type;
433  constexpr auto str = basic_string_view<char_type>(format_str);
434  constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type();
435  if constexpr (c == '}') {
436  return parse_tail<Args, END_POS + 1, NEXT_ID>(
437  field<char_type, typename field_type<T>::type, ARG_INDEX>(),
438  format_str);
439  } else if constexpr (c == ':') {
441  str, END_POS + 1, NEXT_ID == manual_indexing_id ? 0 : NEXT_ID);
442  return parse_tail<Args, result.end, result.next_arg_id>(
444  result.fmt},
445  format_str);
446  }
447 }
448 
449 // Compiles a non-empty format string and returns the compiled representation
450 // or unknown_format() on unrecognized input.
451 template <typename Args, size_t POS, int ID, typename S>
452 constexpr auto compile_format_string(S format_str) {
453  using char_type = typename S::char_type;
454  constexpr auto str = basic_string_view<char_type>(format_str);
455  if constexpr (str[POS] == '{') {
456  if constexpr (POS + 1 == str.size())
457  FMT_THROW(format_error("unmatched '{' in format string"));
458  if constexpr (str[POS + 1] == '{') {
459  return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), format_str);
460  } else if constexpr (str[POS + 1] == '}' || str[POS + 1] == ':') {
461  static_assert(ID != manual_indexing_id,
462  "cannot switch from manual to automatic argument indexing");
463  constexpr auto next_id =
464  ID != manual_indexing_id ? ID + 1 : manual_indexing_id;
465  return parse_replacement_field_then_tail<get_type<ID, Args>, Args,
466  POS + 1, ID, next_id>(
467  format_str);
468  } else {
469  constexpr auto arg_id_result =
470  parse_arg_id<ID>(str.data() + POS + 1, str.data() + str.size());
471  constexpr auto arg_id_end_pos = arg_id_result.arg_id_end - str.data();
472  constexpr char_type c =
473  arg_id_end_pos != str.size() ? str[arg_id_end_pos] : char_type();
474  static_assert(c == '}' || c == ':', "missing '}' in format string");
475  if constexpr (arg_id_result.arg_id.kind == arg_id_kind::index) {
476  static_assert(
477  ID == manual_indexing_id || ID == 0,
478  "cannot switch from automatic to manual argument indexing");
479  constexpr auto arg_index = arg_id_result.arg_id.val.index;
480  return parse_replacement_field_then_tail<get_type<arg_index, Args>,
481  Args, arg_id_end_pos,
482  arg_index, manual_indexing_id>(
483  format_str);
484  } else if constexpr (arg_id_result.arg_id.kind == arg_id_kind::name) {
485  constexpr auto arg_index =
486  get_arg_index_by_name(arg_id_result.arg_id.val.name, Args{});
487  if constexpr (arg_index != invalid_arg_index) {
488  constexpr auto next_id =
489  ID != manual_indexing_id ? ID + 1 : manual_indexing_id;
490  return parse_replacement_field_then_tail<
491  decltype(get_type<arg_index, Args>::value), Args, arg_id_end_pos,
492  arg_index, next_id>(format_str);
493  } else {
494  if constexpr (c == '}') {
495  return parse_tail<Args, arg_id_end_pos + 1, ID>(
496  runtime_named_field<char_type>{arg_id_result.arg_id.val.name},
497  format_str);
498  } else if constexpr (c == ':') {
499  return unknown_format(); // no type info for specs parsing
500  }
501  }
502  }
503  }
504  } else if constexpr (str[POS] == '}') {
505  if constexpr (POS + 1 == str.size())
506  FMT_THROW(format_error("unmatched '}' in format string"));
507  return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), format_str);
508  } else {
509  constexpr auto end = parse_text(str, POS + 1);
510  if constexpr (end - POS > 1) {
511  return parse_tail<Args, end, ID>(make_text(str, POS, end - POS),
512  format_str);
513  } else {
514  return parse_tail<Args, end, ID>(code_unit<char_type>{str[POS]},
515  format_str);
516  }
517  }
518 }
519 
520 template <typename... Args, typename S,
521  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
522 constexpr auto compile(S format_str) {
523  constexpr auto str = basic_string_view<typename S::char_type>(format_str);
524  if constexpr (str.size() == 0) {
525  return detail::make_text(str, 0, 0);
526  } else {
527  constexpr auto result =
528  detail::compile_format_string<detail::type_list<Args...>, 0, 0>(
529  format_str);
530  return result;
531  }
532 }
533 #endif // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
534 } // namespace detail
535 
536 FMT_MODULE_EXPORT_BEGIN
537 
538 #if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
539 
540 template <typename CompiledFormat, typename... Args,
541  typename Char = typename CompiledFormat::char_type,
542  FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
543 FMT_INLINE std::basic_string<Char> format(const CompiledFormat& cf,
544  const Args&... args) {
545  auto s = std::basic_string<Char>();
546  cf.format(std::back_inserter(s), args...);
547  return s;
548 }
549 
550 template <typename OutputIt, typename CompiledFormat, typename... Args,
551  FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
552 constexpr FMT_INLINE OutputIt format_to(OutputIt out, const CompiledFormat& cf,
553  const Args&... args) {
554  return cf.format(out, args...);
555 }
556 
557 template <typename S, typename... Args,
558  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
559 FMT_INLINE std::basic_string<typename S::char_type> format(const S&,
560  Args&&... args) {
561  if constexpr (std::is_same<typename S::char_type, char>::value) {
562  constexpr auto str = basic_string_view<typename S::char_type>(S());
563  if constexpr (str.size() == 2 && str[0] == '{' && str[1] == '}') {
564  const auto& first = detail::first(args...);
565  if constexpr (detail::is_named_arg<
566  remove_cvref_t<decltype(first)>>::value) {
567  return fmt::to_string(first.value);
568  } else {
569  return fmt::to_string(first);
570  }
571  }
572  }
573  constexpr auto compiled = detail::compile<Args...>(S());
574  if constexpr (std::is_same<remove_cvref_t<decltype(compiled)>,
575  detail::unknown_format>()) {
576  return format(static_cast<basic_string_view<typename S::char_type>>(S()),
577  std::forward<Args>(args)...);
578  } else {
579  return format(compiled, std::forward<Args>(args)...);
580  }
581 }
582 
583 template <typename OutputIt, typename S, typename... Args,
584  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
585 FMT_CONSTEXPR OutputIt format_to(OutputIt out, const S&, Args&&... args) {
586  constexpr auto compiled = detail::compile<Args...>(S());
587  if constexpr (std::is_same<remove_cvref_t<decltype(compiled)>,
588  detail::unknown_format>()) {
589  return format_to(out,
590  static_cast<basic_string_view<typename S::char_type>>(S()),
591  std::forward<Args>(args)...);
592  } else {
593  return format_to(out, compiled, std::forward<Args>(args)...);
594  }
595 }
596 #endif
597 
598 template <typename OutputIt, typename S, typename... Args,
599  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
600 format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n,
601  const S& format_str, Args&&... args) {
602  auto it = format_to(detail::truncating_iterator<OutputIt>(out, n), format_str,
603  std::forward<Args>(args)...);
604  return {it.base(), it.count()};
605 }
606 
607 template <typename S, typename... Args,
608  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
609 size_t formatted_size(const S& format_str, const Args&... args) {
610  return format_to(detail::counting_iterator(), format_str, args...).count();
611 }
612 
613 template <typename S, typename... Args,
614  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
615 void print(std::FILE* f, const S& format_str, const Args&... args) {
616  memory_buffer buffer;
617  format_to(std::back_inserter(buffer), format_str, args...);
618  detail::print(f, {buffer.data(), buffer.size()});
619 }
620 
621 template <typename S, typename... Args,
622  FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
623 void print(const S& format_str, const Args&... args) {
624  print(stdout, format_str, args...);
625 }
626 
627 #if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
628 inline namespace literals {
629 template <detail_exported::fixed_string Str>
630 constexpr detail::udl_compiled_string<
631  remove_cvref_t<decltype(Str.data[0])>,
632  sizeof(Str.data) / sizeof(decltype(Str.data[0])), Str>
633 operator""_cf() {
634  return {};
635 }
636 } // namespace literals
637 #endif
638 
639 FMT_MODULE_EXPORT_END
640 FMT_END_NAMESPACE
641 
642 #endif // FMT_COMPILE_H_
fmt::v8::detail::truncating_iterator< OutputIt, std::true_type >::truncating_iterator
truncating_iterator(OutputIt out, size_t limit)
Definition: compile.h:127
fmt::v8::detail::get_arg_index_by_name
auto get_arg_index_by_name(basic_string_view< Char > name) -> int
Definition: core.h:2881
fmt::v8::detail::value_type
remove_cvref_t< decltype(*detail::range_begin(std::declval< Range >()))> value_type
Definition: ranges.h:226
fmt::v8::detail::counting_iterator::operator++
counting_iterator & operator++()
Definition: compile.h:37
fmt::v8::detail::counting_iterator::pointer
void pointer
Definition: compile.h:25
fmt::v8::detail::truncating_iterator_base::truncating_iterator_base
truncating_iterator_base(OutputIt out, size_t limit)
Definition: compile.h:69
size
end IFFT Reshape the symbol vector into two different spatial streams size
Definition: generate_data.m:73
fmt::v8::detail::truncating_iterator_base
Definition: compile.h:61
fmt::v8::detail::compiled_string
Definition: compile.h:141
fmt::v8::detail::truncating_iterator_base::base
OutputIt base() const
Definition: compile.h:81
fmt::v8::detail::truncating_iterator_base::count
size_t count() const
Definition: compile.h:82
Catch::Generators::value
GeneratorWrapper< T > value(T &&value)
Definition: catch.hpp:3999
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: json.hpp:3057
format.h
FMT_INLINE
#define FMT_INLINE
Definition: core.h:218
fmt::v8::detail::arg_id_kind::name
@ name
fmt::v8::detail::counting_iterator::operator+
friend counting_iterator operator+(counting_iterator it, difference_type n)
Definition: compile.h:47
fmt::v8::detail::truncating_iterator< OutputIt, std::true_type >::operator=
truncating_iterator & operator=(T val)
Definition: compile.h:130
fmt::v8::basic_string_view
Definition: core.h:448
detail
Definition: fmt.cpp:13
fmt::v8::detail::value
Definition: core.h:1208
fmt::v8::detail::truncating_iterator_base::limit_
size_t limit_
Definition: compile.h:64
fmt::v8::detail::type::char_type
@ char_type
fmt::v8::detail::counting_iterator::iterator_category
std::output_iterator_tag iterator_category
Definition: compile.h:23
T
T
Definition: simulate_performance.m:4
fmt::v8::detail::counting_iterator::value_type::operator=
void operator=(const T &)
Definition: compile.h:30
fmt::v8::detail::counting_iterator::operator++
counting_iterator operator++(int)
Definition: compile.h:41
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail::get
auto get(const nlohmann::detail::iteration_proxy_value< IteratorType > &i) -> decltype(i.key())
Definition: json.hpp:5193
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail::concat
OutStringType concat(Args &&... args)
Definition: json.hpp:4199
return
return
Definition: generate_data.m:66
fmt::v8::detail::truncating_iterator_base::value_type
typename std::iterator_traits< OutputIt >::value_type value_type
Definition: compile.h:74
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail2::begin
begin_tag begin(T &&...)
fmt::v8::detail::counting_iterator::counting_iterator
counting_iterator()
Definition: compile.h:33
fmt::v8::detail::truncating_iterator
Definition: compile.h:90
spdlog::remove_cvref_t
typename std::remove_cv< typename std::remove_reference< T >::type >::type remove_cvref_t
Definition: common.h:161
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail::void
j template void())
Definition: json.hpp:4744
fmt::v8::detail::counting_iterator::count_
size_t count_
Definition: compile.h:20
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::operator++
truncating_iterator operator++(int)
Definition: compile.h:110
fmt::v8::detail::copy_str
counting_iterator copy_str(InputIt begin, InputIt end, counting_iterator it)
Definition: compile.h:56
fmt::v8::detail::counting_iterator::value_type
Definition: compile.h:29
fmt::v8::arg
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
Definition: core.h:1887
fmt::v8::detail::truncating_iterator_base::truncating_iterator_base
truncating_iterator_base()
Definition: compile.h:67
fmt::v8::detail::truncating_iterator_base::out_
OutputIt out_
Definition: compile.h:63
fmt::v8::detail::truncating_iterator_base::iterator_category
std::output_iterator_tag iterator_category
Definition: compile.h:73
s
s
Definition: simulate_performance.m:3
matplotlibcpp::text
void text(Numeric x, Numeric y, const std::string &s="")
Definition: matplotlibcpp.h:1834
fmt::v8::detail::truncating_iterator< OutputIt, std::true_type >::operator++
truncating_iterator & operator++()
Definition: compile.h:135
fmt::v8::detail::is_compiled_string
Definition: compile.h:144
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::operator*
value_type & operator*() const
Definition: compile.h:116
extract_version.data
dictionary data
Definition: extract_version.py:8
fmt::v8::detail::counting_iterator::difference_type
std::ptrdiff_t difference_type
Definition: compile.h:24
n
n
Definition: simulate_performance.m:1
fmt::v8::detail::truncating_iterator_base::difference_type
std::ptrdiff_t difference_type
Definition: compile.h:75
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::truncating_iterator
truncating_iterator(OutputIt out, size_t limit)
Definition: compile.h:102
FMT_ASSERT
#define FMT_ASSERT(condition, message)
Definition: core.h:378
fmt::v8::detail::first
const T & first(const T &value, const Tail &...)
Definition: compile.h:178
std
Definition: json.hpp:5213
fmt::v8::detail::truncating_iterator< OutputIt, std::true_type >::operator*
truncating_iterator & operator*()
Definition: compile.h:137
fmt
Definition: bin_to_hex.h:102
fmt::v8::detail::counting_iterator::count
size_t count() const
Definition: compile.h:35
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::operator++
truncating_iterator & operator++()
Definition: compile.h:105
FMT_BEGIN_NAMESPACE
#define FMT_BEGIN_NAMESPACE
Definition: core.h:237
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::blackhole_
truncating_iterator_base< OutputIt >::value_type blackhole_
Definition: compile.h:95
fmt::v8::detail::truncating_iterator< OutputIt, std::true_type >::operator++
truncating_iterator & operator++(int)
Definition: compile.h:136
fmt::v8::detail::truncating_iterator_base::pointer
void pointer
Definition: compile.h:76
fmt::v8::detail::counting_iterator::operator*
value_type operator*() const
Definition: compile.h:52
fmt::v8::detail::to_unsigned
auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition: core.h:424
fmt::v8::detail::counting_iterator
Definition: compile.h:18
nlohmann::json_v3_11_1NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON::detail2::end
end_tag end(T &&...)
fmt::v8::detail::digits::result
result
Definition: format-inl.h:640
fmt::v8::detail::truncating_iterator< OutputIt, std::false_type >::value_type
typename truncating_iterator_base< OutputIt >::value_type value_type
Definition: compile.h:98
utils::format
std::string format(const T &value)
Definition: utils.h:15
fmt::v8::detail::type
type
Definition: core.h:1131
FMT_THROW
#define FMT_THROW(x)
Definition: format.h:95
fmt::v8::detail::counting_iterator::reference
void reference
Definition: compile.h:26
fmt::v8::detail::truncating_iterator_base::reference
void reference
Definition: compile.h:77
fmt::v8::detail::parse_arg_id
auto parse_arg_id(const Char *begin, const Char *end, IDHandler &&handler) -> const Char *
Definition: core.h:2374