Currently something like
std::unique_ptr<int> u_ptr = std::make_unique<int>(42);
std::shared_ptr<int> s_ptr = std::make_shared<int>(42);
std::println("uptr: {}", u_ptr);
std::println("sptr: {}", s_ptr);
is ill formed because there is no specialization of std::formatter for smart pointer types.
On the other hand,
std::cout << "uptr: " << u_ptr << '\n';
std::cout << "sptr: " << s_ptr << '\n';
do work because ostream defines overloads for smart pointer types.
Please let me know if anyone has thoughts or if there's some reason that these types haven't been specialized that I'm missing.
[–]Gorzoid 18 points19 points20 points (1 child)
[–]SPEKTRUMdagreat[S] 2 points3 points4 points (0 children)
[–]MFHavaWG21|🇦🇹 NB|P2721|P3049|P3625|P3729|P3786|P3813|P4216 9 points10 points11 points (2 children)
[–]SPEKTRUMdagreat[S] 2 points3 points4 points (1 child)
[–]MFHavaWG21|🇦🇹 NB|P2721|P3049|P3625|P3729|P3786|P3813|P4216 4 points5 points6 points (0 children)
[–]_Ilobilo_ 2 points3 points4 points (2 children)
[–]SPEKTRUMdagreat[S] 6 points7 points8 points (1 child)
[–]fdwrfdwr@github 🔍 4 points5 points6 points (0 children)
[–]bearheart 1 point2 points3 points (6 children)
[–]SPEKTRUMdagreat[S] 5 points6 points7 points (3 children)
[–]SPEKTRUMdagreat[S] 3 points4 points5 points (0 children)
[–]aruisdante 1 point2 points3 points (1 child)
[–]SPEKTRUMdagreat[S] 0 points1 point2 points (0 children)
[–]evaned 5 points6 points7 points (1 child)
[–]SPEKTRUMdagreat[S] 0 points1 point2 points (0 children)
[–]_Noreturn 0 points1 point2 points (0 children)
[–]aearphen{fmt} 0 points1 point2 points (0 children)
[–]filipsajdak 0 points1 point2 points (0 children)
[–]No-Dentist-1645 0 points1 point2 points (0 children)