-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<xmemory>: constexpr containers fail to compile if _DEBUG is defined #4427
Comments
IMO this can be treated as a duplicate of #1035. This is probably "already" fixed in vNext. |
Yep, this is half a duplicate, half by design. Half a duplicate - in v19, all STL containers dynamically allocate a "proxy object" in debug mode to make iterator debugging work. We can't change this without breaking ABI, and this prevents Half by design - For Ultimately, unlike #1035 (which a problem, albeit a very specific one that doesn't strike most code), top-level |
I understand that the constexpr case does not make much sense (it was the minimal repro), but what about the constinit case? What if I want to make sure certain variables do not accrue an initialization cost? https://godbolt.org/z/EaM6aebch
|
Every namespace-scope Standard container has dynamic initialization, even if it only registers the destructor with |
|
The following code fails to compile if _DEBUG is defined.
https://godbolt.org/z/8e6ejch4n
The text was updated successfully, but these errors were encountered: