C++ Logo

std-proposals

Advanced search

Re: [std-proposals] ABI

From: Hans <hguijtra_at_[hidden]>
Date: Sun, 21 Jul 2024 17:51:21 +0200
On 19/07/2024 10:19, zxuiji via Std-Proposals wrote:
> > std::__cxx11::basic_string
> This implies to me the standard library already has a mechanism for
> cross-library communication. It just seems it was never properly
> utilised. You could extend this to something like
> std::ucrt::mingw64::parent_string_class. If you do this for every
> existing ABI and then start mandating that vendors put their
> implementations in said namespaces for which the standard library can
> refer to then you can move std::* stuff away from vendor implementations
> and instead treat them as fallbacks for standardised stuff. An example
> would be that very regex class. Had this been a thing before you
> could've from the get go implemented something like
> std::regex::useimplementation(std::libc::clang::regex); and
> std::regex::getimplementationname(void);

That works for standalone use of std::string, which gets name-mangled
properly so you can tell which one it was, but not when std::string is a
member of some other class, as it's not part of the mangled name of the
host class.


Hans Guijt

Received on 2024-07-21 15:51:25