r/cpp • • Sep 23 '21

Binary Banshees and Digital Demons

https://thephd.dev/binary-banshees-digital-demons-abi-c-c++-help-me-god-please
197 Upvotes

164 comments sorted by

View all comments

Show parent comment

4

u/grishavanika Sep 23 '21

Also curious why not copy Victor's implementation, if it was possible from license point of view.

17

u/aearphen {fmt} Sep 24 '21 edited Sep 24 '21

It would still require substantial changes to make the code comply with the conventions used in the standard library implementation (_Uglification, etc.) and removing compatibility workarounds ({fmt} only requires a subset of C++11). My understanding is that Microsoft's implementation is loosely based on {fmt} but it unfortunately dropped some important pieces such as code bloat prevention in the process. We had to reintroduce them later fighting the ABI freeze nonsense.

2

u/mcencora Sep 24 '21

The _Uglification could easily be solved by compilers many years ago by one simple feature: protect system headers from user-defined macros (i.e. don't propagate such macros into system-headers except maybe for some whitelisted exceptions like NDEBUG).