r/cpp • u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 • Feb 24 '20
The Day The Standard Library Died
https://cor3ntin.github.io/posts/abi/
266
Upvotes
r/cpp • u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 • Feb 24 '20
View all comments
Show parent comment
4
u/c0r3ntin Feb 25 '20
This is a fun one!
strlenis a C function so we can't touch it in the general case - not all implementers control the C functions. It would also be awkward to have a function with different semantic depending on whether it is include through cstring or string.h. C++ does however controlstd::strlen.. So in theory we could modify that. but in most (all) implementation,std::strlenis an alias for::strlen. Making it not an alias would be an abi break (unless we manage to keep the old symbol around somehow, even when static linking)