From f3b20f30c57c592854a64af00834b3ae4c8333c7 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 28 Nov 2025 23:38:55 -0500 Subject: [PATCH] Putting a big fat warning to never leave libformat again. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index d489c31..4f2a1c0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,34 @@ talks about. You know the one? You don't? Oh sorry, I thought you were cool. Currently it's only officially tested on Windows, but I'm not really using anything OS specific (I think). +## Why Not std::format/print? + +Because there's a _TWO YEAR OLD_ bug in GCC that prevents compiling with the "new" (two years is +"new" in C++) std::print, std::format functions: + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110572 + +If you statically link then the function `std::type_info` gets included twice because the library +`stdc++exp` also includes it. Yes, you can't use the new print and format functions because some +idiot included a bunch of useless functions in the "experimental" library, and it only is a problem +when you statically link your binary. + +But why statically link you ask? Oh, that's because Meson is too stupid to take all of the .dll +files you need and _put them in one place_ so your fucking program will actually run. Meson instead +leaves the .dll files scattered about the `builddir` directory in whatever random ass place each +project decided to place them, so statically linking is the only way you'll reliably run your code. + +Oh, but that's not all. Meson also makes the "genius" decision that if you download a project with a +`.wrap` file that it will download it for you, compile it, and then _completely fucking ignore what +it just built and use the system version of the .dll anyway_. Yes, Meson will go through the trouble +of building a new .dll for you then not link against it. + +So, since static linking is the only way to create a reliable executable, and static linking causes +a bug in G++'s implementation of "experimental" (2 years old is experimental) print and format, then +we have to libformat. + +Congratualtions, you just became dumber for reading that. + ## Where's the LICENSE? You don't need a LICENSE that gives everything away to thieving corporations just to publish your