5#include <reloco/binary_heap.hpp>
6#include <reloco/boxed_slice.hpp>
7#include <reloco/call_location.hpp>
8#include <reloco/cell.hpp>
9#include <reloco/checked.hpp>
10#include <reloco/collection_view.hpp>
11#include <reloco/cow.hpp>
12#include <reloco/duration.hpp>
13#include <reloco/error.hpp>
14#include <reloco/external_vector.hpp>
15#include <reloco/fixed_int.hpp>
16#include <reloco/fixed_point.hpp>
17#include <reloco/flat_hash_map.hpp>
18#include <reloco/flat_hash_set.hpp>
19#include <reloco/flat_map.hpp>
20#include <reloco/flat_set.hpp>
21#include <reloco/inline_flat_map.hpp>
22#include <reloco/inline_flat_set.hpp>
23#include <reloco/inline_string.hpp>
24#include <reloco/inline_vec_deque.hpp>
25#include <reloco/inline_vector.hpp>
26#include <reloco/instant.hpp>
27#include <reloco/lifetime.hpp>
28#include <reloco/lru_cache.hpp>
29#include <reloco/masked_pointer.hpp>
30#include <reloco/non_zero.hpp>
31#include <reloco/obfuscated_string.hpp>
32#include <reloco/ordering.hpp>
33#include <reloco/outline_vec_deque.hpp>
34#include <reloco/outline_vector.hpp>
35#include <reloco/packed_bits.hpp>
36#include <reloco/rc.hpp>
37#include <reloco/ring_buffer.hpp>
38#include <reloco/saturating.hpp>
39#include <reloco/shared_ptr.hpp>
40#include <reloco/sso_flat_map.hpp>
41#include <reloco/sso_flat_set.hpp>
42#include <reloco/sso_string.hpp>
43#include <reloco/sso_vec_deque.hpp>
44#include <reloco/sso_vector.hpp>
45#include <reloco/string.hpp>
46#include <reloco/tree_map.hpp>
47#include <reloco/tree_set.hpp>
48#include <reloco/type_id.hpp>
49#include <reloco/unique_ptr.hpp>
50#include <reloco/variant.hpp>
51#include <reloco/vec_deque.hpp>
52#include <reloco/vector.hpp>
53#include <reloco/wrapping.hpp>
59template <
typename Formatter,
typename Range>
63 for (
const auto &elem : range) {
68 elem_formatter.format(elem, out);
73template <
typename KeyFormatter,
typename ValueFormatter,
typename Range>
74void format_reloco_map(
const KeyFormatter &key_formatter,
const ValueFormatter &value_formatter,
const Range &range,
75 const sink &out)
noexcept {
78 for (
const auto &entry : range) {
83 key_formatter.format(entry.first, out);
85 value_formatter.format(entry.second, out);
109 underlying_formatter.
parse(ctx);
112 void format(
const reloco::collection_view<T> &view,
const sink &out)
const noexcept {
115 bool is_first =
true;
118 view.for_each([
this, &is_first, &out](
const T &elem)
noexcept {
125 underlying_formatter.
format(elem, out);
139template <
typename Container,
140 std::enable_if_t<reloco::detail::has_collection_view_traits<std::remove_const_t<Container>>::value,
int> = 0>
142 using traits = reloco::collection_view_traits<std::remove_const_t<Container>>;
143 using element_type =
typename traits::element_type;
146 return reloco::collection_view<const element_type>(c);
155template <
typename T>
struct formatter<
reloco::detail::mutable_sequence_container_ref<T>> {
162 void format(
const reloco::detail::mutable_sequence_container_ref<T> &cref,
const sink &out)
const noexcept {
164 bool is_first =
true;
166 cref.for_each([
this, &is_first, &out](T &elem)
noexcept {
171 underlying_formatter.
format(elem, out);
185template <
typename T,
typename Key>
struct formatter<
reloco::detail::mutable_associative_container_ref<T, Key>> {
194 value_formatter.
parse(ctx);
197 void format(
const reloco::detail::mutable_associative_container_ref<T, Key> &cref,
const sink &out)
const noexcept {
199 bool is_first =
true;
201 cref.for_each([
this, &is_first, &out](
const Key &key, T &value)
noexcept {
207 key_formatter.
format(key, out);
209 value_formatter.
format(value, out);
242 bool is_first =
true;
243 for (
const auto &elem :
vec) {
248 underlying_formatter.
format(elem, out);
260template <
typename T,
typename Compare>
struct formatter<
reloco::flat_set<T, Compare>> {
267 void format(
const reloco::flat_set<T, Compare> &set,
const sink &out)
const noexcept {
269 bool is_first =
true;
270 for (
const auto &elem : set) {
275 underlying_formatter.
format(elem, out);
287template <
typename CharT,
typename TraitsT>
struct formatter<
reloco::basic_string<CharT, TraitsT>> {
292 void format(
const reloco::basic_string<CharT, TraitsT> &str,
const sink &out)
const noexcept {
293 underlying_formatter.format(str.view(), out);
303template <std::
size_t Capacity,
typename CharT,
typename TraitsT>
309 void format(
const reloco::basic_inline_string<Capacity, CharT, TraitsT> &str,
const sink &out)
const noexcept {
310 underlying_formatter.format(str.view(), out);
320template <
typename CharT,
typename TraitsT>
struct formatter<
reloco::basic_sso_string<CharT, TraitsT>> {
325 void format(
const reloco::basic_sso_string<CharT, TraitsT> &str,
const sink &out)
const noexcept {
326 underlying_formatter.format(str.view(), out);
347 void format(
const reloco::obfuscated_decrypted_view<N> &val,
const sink &out)
const noexcept {
348 underlying_formatter.format(val.view(), out);
375 void format(reloco::obfuscated_string_ref val,
const sink &out)
const noexcept {
376 val.for_each_byte([&out](
char ch)
noexcept { out.put(ch); });
394 void format(
const reloco::obfuscated_string<N> &val,
const sink &out)
const noexcept {
395 underlying_formatter.format(val.as_ref(), out);
405template <
typename T, std::
size_t Capacity>
struct formatter<
reloco::inline_vector<T, Capacity>> {
412 void format(
const reloco::inline_vector<T, Capacity> &
vec,
const sink &out)
const noexcept {
414 bool is_first =
true;
415 for (
const auto &elem :
vec) {
420 underlying_formatter.
format(elem, out);
432template <
typename T, std::
size_t Capacity,
typename Compare>
440 void format(
const reloco::inline_flat_set<T, Capacity, Compare> &set,
const sink &out)
const noexcept {
442 bool is_first =
true;
443 for (
const auto &elem : set) {
448 underlying_formatter.
format(elem, out);
460template <
typename Key,
typename Mapped,
typename Compare>
struct formatter<
reloco::flat_map<Key, Mapped, Compare>> {
465 key_formatter.
parse(ctx);
466 value_formatter.
parse(ctx);
469 void format(
const reloco::flat_map<Key, Mapped, Compare> &map,
const sink &out)
const noexcept {
471 bool is_first =
true;
472 for (
const auto &entry : map) {
478 key_formatter.
format(entry.first, out);
480 value_formatter.
format(entry.second, out);
493template <
typename Key,
typename Mapped, std::
size_t Capacity,
typename Compare>
499 key_formatter.
parse(ctx);
500 value_formatter.
parse(ctx);
503 void format(
const reloco::inline_flat_map<Key, Mapped, Capacity, Compare> &map,
const sink &out)
const noexcept {
505 bool is_first =
true;
506 for (
const auto &entry : map) {
512 key_formatter.
format(entry.first, out);
514 value_formatter.
format(entry.second, out);
533 void format(
const reloco::boxed_slice<T> &slice,
const sink &out)
const noexcept {
535 bool is_first =
true;
536 for (
const auto &elem : slice) {
541 underlying_formatter.
format(elem, out);
555template <
typename T,
typename Compare>
struct formatter<
reloco::binary_heap<T, Compare>> {
562 void format(
const reloco::binary_heap<T, Compare> &heap,
const sink &out)
const noexcept {
564 bool is_first =
true;
565 for (
const auto &elem : heap) {
570 underlying_formatter.
format(elem, out);
582template <
typename T, std::
size_t InlineCapacity>
struct formatter<
reloco::sso_vector<T, InlineCapacity>> {
589 void format(
const reloco::sso_vector<T, InlineCapacity> &
vec,
const sink &out)
const noexcept {
591 bool is_first =
true;
592 for (
const auto &elem :
vec) {
597 underlying_formatter.
format(elem, out);
609template <
typename T, std::
size_t InlineCapacity,
typename Compare>
617 void format(
const reloco::sso_flat_set<T, InlineCapacity, Compare> &set,
const sink &out)
const noexcept {
619 bool is_first =
true;
620 for (
const auto &elem : set) {
625 underlying_formatter.
format(elem, out);
638template <
typename Key,
typename Mapped, std::
size_t InlineCapacity,
typename Compare>
644 key_formatter.
parse(ctx);
645 value_formatter.
parse(ctx);
648 void format(
const reloco::sso_flat_map<Key, Mapped, InlineCapacity, Compare> &map,
const sink &out)
const noexcept {
650 bool is_first =
true;
651 for (
const auto &entry : map) {
657 key_formatter.
format(entry.first, out);
659 value_formatter.
format(entry.second, out);
678 void format(
const reloco::outline_vector<T> &
vec,
const sink &out)
const noexcept {
680 bool is_first =
true;
681 for (
const auto &elem :
vec) {
686 underlying_formatter.
format(elem, out);
708 void format(
const reloco::vec_deque<T> &deque,
const sink &out)
const noexcept {
710 const std::size_t n = deque.size();
711 for (std::size_t i = 0; i < n; ++i) {
715 underlying_formatter.
format(deque[i], out);
728template <
typename T, std::
size_t InlineCapacity>
struct formatter<
reloco::sso_vec_deque<T, InlineCapacity>> {
735 void format(
const reloco::sso_vec_deque<T, InlineCapacity> &deque,
const sink &out)
const noexcept {
737 const std::size_t n = deque.size();
738 for (std::size_t i = 0; i < n; ++i) {
742 underlying_formatter.
format(deque[i], out);
755template <
typename T, std::
size_t Capacity>
struct formatter<
reloco::inline_vec_deque<T, Capacity>> {
762 void format(
const reloco::inline_vec_deque<T, Capacity> &deque,
const sink &out)
const noexcept {
764 const std::size_t n = deque.size();
765 for (std::size_t i = 0; i < n; ++i) {
769 underlying_formatter.
format(deque[i], out);
789 void format(
const reloco::outline_vec_deque<T> &deque,
const sink &out)
const noexcept {
791 const std::size_t n = deque.size();
792 for (std::size_t i = 0; i < n; ++i) {
796 underlying_formatter.
format(deque[i], out);
811template <
typename T,
typename Hash,
typename KeyEqual>
struct formatter<
reloco::flat_hash_set<T, Hash, KeyEqual>> {
818 void format(
const reloco::flat_hash_set<T, Hash, KeyEqual> &set,
const sink &out)
const noexcept {
820 bool is_first =
true;
821 for (
const auto &elem : set) {
826 underlying_formatter.
format(elem, out);
840template <
typename Key,
typename Mapped,
typename Hash,
typename KeyEqual>
846 key_formatter.
parse(ctx);
847 value_formatter.
parse(ctx);
850 void format(
const reloco::flat_hash_map<Key, Mapped, Hash, KeyEqual> &map,
const sink &out)
const noexcept {
852 bool is_first =
true;
853 for (
const auto &entry : map) {
859 key_formatter.
format(entry.first, out);
861 value_formatter.
format(entry.second, out);
889 void format(
const value_ptr<T> &ptr,
const sink &out)
const noexcept {
894 underlying_formatter.
format(*ptr.get(), out);
910 void format(
const value_ref<T> &ref,
const sink &out)
const noexcept { underlying_formatter.
format(*ref, out); }
924 void format(
const reloco::unique_ptr<T> &ptr,
const sink &out)
const noexcept {
929 underlying_formatter.
format(*ptr.get(), out);
944 void format(
const reloco::shared_ptr<T> &ptr,
const sink &out)
const noexcept {
949 underlying_formatter.
format(*ptr.get(), out);
965 void format(
const reloco::weak_ptr<T> &weak,
const sink &out)
const noexcept {
966 auto locked = weak.lock();
967 if (!locked.has_value()) {
968 out.write(
"(expired)");
971 underlying_formatter.
format(*locked.value().get(), out);
986 void format(
const reloco::rc<T> &ptr,
const sink &out)
const noexcept {
991 underlying_formatter.
format(*ptr.get(), out);
1007 void format(
const reloco::weak_rc<T> &weak,
const sink &out)
const noexcept {
1008 auto locked = weak.lock();
1009 if (!locked.has_value()) {
1010 out.write(
"(expired)");
1013 underlying_formatter.
format(*locked.value().get(), out);
1029 void format(
const reloco::cow<T> &value,
const sink &out)
const noexcept {
1030 underlying_formatter.
format(value.get(), out);
1051 void format(
const reloco::non_zero<T> &value,
const sink &out)
const noexcept {
1052 underlying_formatter.
format(value.get(), out);
1064 void format(
const reloco::saturating<T> &value,
const sink &out)
const noexcept {
1065 underlying_formatter.
format(value.get(), out);
1077 void format(
const reloco::wrapping<T> &value,
const sink &out)
const noexcept {
1078 underlying_formatter.
format(value.get(), out);
1096 void format(
const reloco::checked<T> &value,
const sink &out)
const noexcept {
1097 underlying_formatter.
format(value.get(), out);
1117 uint8_t precision{9};
1119 bool show_unit{
true};
1122 for (
char c : ctx.spec()) {
1123 if (c ==
'm' || c ==
'3')
1125 else if (c ==
'u' || c ==
'6')
1127 else if (c ==
'n' || c ==
'9')
1129 else if (c ==
'r' || c ==
'R')
1134 void format(
const reloco::duration &value,
const sink &out)
const noexcept {
1135 detail::format_unsigned<detail::radix::decimal>(out, value.as_secs(),
false, 0);
1137 if (precision == 3) {
1138 detail::format_unsigned<detail::radix::decimal>(out, value.subsec_millis(),
false, 3);
1139 }
else if (precision == 6) {
1140 detail::format_unsigned<detail::radix::decimal>(out, value.subsec_micros(),
false, 6);
1142 detail::format_unsigned<detail::radix::decimal>(out, value.subsec_nanos(),
false, 9);
1168 RELOCO_BEGIN_UNSAFE_CODE
1169 void format(
const reloco::instant &value,
const sink &out)
const noexcept {
1170 const reloco::duration since_epoch = value.duration_since(reloco::instant());
1172 const std::uint64_t total_secs = since_epoch.as_secs();
1173 const std::uint32_t hours =
static_cast<std::uint32_t
>(total_secs / 3600);
1174 const std::uint32_t mins =
static_cast<std::uint32_t
>((total_secs % 3600) / 60);
1175 const std::uint32_t secs =
static_cast<std::uint32_t
>(total_secs % 60);
1177 detail::format_unsigned<detail::radix::decimal>(out, hours,
false, 2);
1179 detail::format_unsigned<detail::radix::decimal>(out, mins,
false, 2);
1181 detail::format_unsigned<detail::radix::decimal>(out, secs,
false, 2);
1183 detail::format_unsigned<detail::radix::decimal>(out, since_epoch.subsec_millis(),
false, 3);
1197 void format(reloco::ordering value,
const sink &out)
const noexcept {
1199 case reloco::ordering::less:
1202 case reloco::ordering::equal:
1205 case reloco::ordering::greater:
1206 out.write(
"greater");
1209 out.write(
"unknown");
1230 RELOCO_BEGIN_UNSAFE_CODE
1231 void format(reloco::type_id value,
const sink &out)
const noexcept {
1233 out.write(
"<no type>");
1236 const char *name = value.name();
1237 if (name ==
nullptr) {
1238 out.write(
"<unnamed type>");
1254 void format(
const reloco::error &val,
const sink &out)
const noexcept {
1255 using reloco::error;
1257 case error::allocation_failed:
1258 out.write(
"allocation_failed");
1260 case error::in_place_growth_failed:
1261 out.write(
"in_place_growth_failed");
1263 case error::unsupported_operation:
1264 out.write(
"unsupported_operation");
1266 case error::out_of_range:
1267 out.write(
"out_of_range");
1269 case error::invalid_argument:
1270 out.write(
"invalid_argument");
1272 case error::already_exists:
1273 out.write(
"already_exists");
1275 case error::empty_pointer:
1276 out.write(
"empty_pointer");
1278 case error::pointer_expired:
1279 out.write(
"pointer_expired");
1281 case error::no_owner:
1282 out.write(
"no_owner");
1284 case error::out_of_bounds:
1285 out.write(
"out_of_bounds");
1287 case error::deadlock:
1288 out.write(
"deadlock");
1290 case error::invalid_owner:
1291 out.write(
"invalid_owner");
1293 case error::still_locked:
1294 out.write(
"still_locked");
1296 case error::not_locked:
1297 out.write(
"not_locked");
1299 case error::timed_out:
1300 out.write(
"timed_out");
1302 case error::try_again:
1303 out.write(
"try_again");
1305 case error::not_initialized:
1306 out.write(
"not_initialized");
1308 case error::container_empty:
1309 out.write(
"container_empty");
1311 case error::not_found:
1312 out.write(
"not_found");
1314 case error::integer_overflow:
1315 out.write(
"integer_overflow");
1317 case error::division_by_zero:
1318 out.write(
"division_by_zero");
1320 case error::capacity_exceeded:
1321 out.write(
"capacity_exceeded");
1323 case error::invalid_state:
1324 out.write(
"invalid_state");
1326 case error::permission_denied:
1327 out.write(
"permission_denied");
1329 case error::interrupted:
1330 out.write(
"interrupted");
1332 case error::resource_exhausted:
1333 out.write(
"resource_exhausted");
1338 case error::io_error:
1339 out.write(
"io_error");
1341 case error::operation_canceled:
1342 out.write(
"operation_canceled");
1344 case error::security_violation:
1345 out.write(
"security_violation");
1347 case error::page_fault:
1348 out.write(
"page_fault");
1367 void format(
const reloco::tree_set<T, Compare> &set,
const sink &out)
const noexcept {
1377template <
typename Key,
typename Mapped,
typename Compare>
struct formatter<
reloco::tree_map<Key, Mapped, Compare>> {
1382 key_formatter.
parse(ctx);
1383 value_formatter.
parse(ctx);
1386 void format(
const reloco::tree_map<Key, Mapped, Compare> &map,
const sink &out)
const noexcept {
1397template <
typename Key,
typename Mapped,
typename Hash,
typename KeyEqual>
1403 key_formatter.
parse(ctx);
1404 value_formatter.
parse(ctx);
1407 void format(
const reloco::lru_cache<Key, Mapped, Hash, KeyEqual> &cache,
const sink &out)
const noexcept {
1418 void format(
const reloco::external_vector<T> &
vec,
const sink &out)
const noexcept {
1428#define MICROFMT_RELOCO_RING_FORMATTER(TEMPLATE_HEAD, TYPE) \
1429 TEMPLATE_HEAD struct formatter<TYPE> { \
1430 detail::element_formatter<std::remove_cv_t<T>> underlying_formatter; \
1431 constexpr void parse(format_parse_context &ctx) noexcept { underlying_formatter.parse(ctx); } \
1432 void format(const TYPE &ring, const sink &out) const noexcept { \
1433 detail::format_reloco_sequence(underlying_formatter, ring, out); \
1437#define MICROFMT_COMMA ,
1442 reloco::inline_ring_buffer<T MICROFMT_COMMA N>);
1444 reloco::sso_ring_buffer<T MICROFMT_COMMA N>);
1445#undef MICROFMT_COMMA
1446#undef MICROFMT_RELOCO_RING_FORMATTER
1454 void format(
const reloco::variant<Ts...> &var,
const sink &out)
const noexcept {
1455 base_formatter.format(
static_cast<const std::variant<Ts...
> &>(var), out);
1465 void format(
const reloco::cell<T> &c,
const sink &out)
const noexcept { underlying_formatter.
format(c.get(), out); }
1472 void format(
const reloco::call_location &loc,
const sink &out)
const noexcept {
1473 out.write(loc.file !=
nullptr ? microfmt::string_view(loc.file) : microfmt::string_view(
"<unknown>"));
1483 void format(
const reloco::call_location_ref &ref,
const sink &out)
const noexcept {
1484 if (!ref.has_value()) {
1485 out.write(
"<no location>");
1499 underlying_formatter.format(
bits.value(), out);
1507template <
typename T,
typename AuthPolicy>
struct formatter<
reloco::masked_pointer<T, AuthPolicy>> {
1512 RELOCO_BEGIN_UNSAFE_CODE
1513 void format(
const reloco::masked_pointer<T, AuthPolicy> &ptr,
const sink &out)
const noexcept {
1514 const void *raw =
static_cast<const void *
>(ptr.get());
1515 if (raw ==
nullptr) {
1516 out.write(
"(null)");
1530template <
typename Rep,
unsigned FracBits>
1531struct formatter<
reloco::fixed_point<Rep, FracBits>, std::enable_if_t<std::is_arithmetic_v<Rep>>> {
1536 void format(
const reloco::fixed_point<Rep, FracBits> &value,
const sink &out)
const noexcept {
1537 underlying_formatter.format(
static_cast<double>(value.raw()) /
static_cast<double>(Rep{1} << FracBits), out);
1547template <std::
size_t N,
bool Signed>
1551 RELOCO_BEGIN_UNSAFE_CODE
1552 void format(
const reloco::detail::wide_int<N, Signed> &val,
const sink &out)
const noexcept {
1553 RELOCO_BEGIN_UNSAFE_BUFFER_USAGE;
1554 constexpr std::size_t limb_count = N / 32;
1556 constexpr std::size_t buf_size = N / 3 + 2;
1558 std::uint32_t mag[limb_count];
1559 const bool negative = val.is_negative();
1560 const reloco::detail::wide_int<N, Signed> abs_val = negative ? -val : val;
1561 for (std::size_t i = 0; i < limb_count; ++i) {
1562 mag[i] = abs_val.limb(i);
1565 char buffer[buf_size];
1566 char *end = buffer + buf_size;
1569 microfmt::string_view prefix{};
1571 const char *lut = flags.uppercase ?
"0123456789ABCDEF" :
"0123456789abcdef";
1572 for (std::size_t i = 0; i < limb_count; ++i) {
1573 std::uint32_t limb = mag[i];
1574 for (
int nibble = 0; nibble < 8; ++nibble) {
1575 *--start = lut[limb & 0xFU];
1580 while (start < end - 1 && *start ==
'0') {
1583 if (flags.alt_form) {
1584 prefix = flags.uppercase ? microfmt::string_view(
"0X") : microfmt::string_view(
"0x");
1587 std::size_t used = limb_count;
1590 std::uint64_t rem = 0;
1591 for (std::size_t i = used; i-- > 0;) {
1592 const std::uint64_t cur = (rem << 32) | mag[i];
1593 mag[i] =
static_cast<std::uint32_t
>(cur / 1000000000U);
1594 rem = cur % 1000000000U;
1596 while (used > 0 && mag[used - 1] == 0) {
1599 auto chunk =
static_cast<std::uint32_t
>(rem);
1600 for (
int digit = 0; digit < 9 && (used > 0 || chunk != 0 || digit == 0); ++digit) {
1601 *--start =
static_cast<char>(
'0' + chunk % 10U);
1609 RELOCO_END_UNSAFE_BUFFER_USAGE;
1614#if defined(__SIZEOF_INT128__)
1618RELOCO_BEGIN_SUPPRESS_PEDANTIC_INT128
1623template <
typename T>
1624struct formatter<T, std::enable_if_t<reloco::detail::is_builtin_int128_v<T> && !std::is_integral_v<T>>>
1625 : formatter<reloco::detail::wide_int<128, std::is_same_v<T, __int128>>> {
1626 void format(T val,
const sink &out)
const noexcept {
1627 constexpr bool is_signed = std::is_same_v<T, __int128>;
1628 formatter<reloco::detail::wide_int<128, is_signed>>
::format(reloco::detail::wide_int<128, is_signed>(val), out);
1631RELOCO_END_SUPPRESS_PEDANTIC_INT128
Definition microfmt.hpp:881
Floating-point formatting backed by printf-style specifiers.
Core formatting primitives, sinks, and customization point.
void format_reloco_map(const KeyFormatter &key_formatter, const ValueFormatter &value_formatter, const Range &range, const sink &out) noexcept
Definition reloco.hpp:74
RELOCO_BEGIN_UNSAFE_CODE RELOCO_ALWAYS_INLINE void emit_formatted_int(const sink &out, const char *digits, size_t digits_len, bool is_negative, microfmt::string_view prefix, uint8_t width, bool zero_pad) noexcept
Definition microfmt.hpp:1124
void format_reloco_sequence(const Formatter &elem_formatter, const Range &range, const sink &out) noexcept
Definition reloco.hpp:60
reloco::sink sink
Type-erased, zero-allocation output sink.
Definition microfmt.hpp:46
RELOCO_CONSTEXPR20 void format_to(const sink &out, microfmt::string_view fmt, const Args &...args) noexcept
Definition microfmt.hpp:1766
constexpr auto as_collection_view(Container &c) noexcept
Definition reloco.hpp:141
constexpr bitfield_view bits(uint32_t raw_val, span< const bit_field > fields, bool show_raw_hex=true, microfmt::string_view sep=" | ") noexcept
Definition bitfield.hpp:36
constexpr auto vec(const T(&arr)[N]) noexcept
Definition math.hpp:28
RELOCO_CONSTEXPR20 buffer_sink< N > format(microfmt::string_view fmt, const Args &...args) noexcept
Definition microfmt.hpp:1786
RELOCO_END_UNSAFE_CODE
Definition remote_object.hpp:132
Definition debug_float.hpp:36
`std::variant` and non-owning variant view formatting.