30 if constexpr (std::is_same_v<T, std::atomic_flag>) {
31 out << (it.test() ?
"SET" :
"CLEAR");
32 }
else if constexpr (packtl::is_type<std::unique_ptr, T>::value) {
33 const auto* value = it.get();
35 out << std::format(
"0x{:X}", (std::size_t)value);
37 }
else if constexpr (packtl::is_type<std::shared_ptr, T>::value) {
38 const auto* value = it.get();
40 out << std::format(
"0x{:X}", (std::size_t)value);
42 }
else if constexpr (packtl::is_type<std::weak_ptr, T>::value) {
43 const auto* value = it.get();
45 out << std::format(
"0x{:X}", (std::size_t)value);
48 if (visited_.contains((std::size_t)&it)) {
49 out <<
"<circular reference>";
52 visited_.emplace((std::size_t)&it);
53 }
else if constexpr (std::is_convertible_v<T, std::string>) {
54 out << std::format(
"{:?}", it);
55 }
else if constexpr (std::same_as<T, char>) {
56 out << std::format(
"0x{:X} '{}'", (
int)it, it);
57 }
else if constexpr (std::formattable<T, char>) {
58 out << std::format(
"{}", it);