WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to implement WG21-P2819R2 "Add The Tuple Protocol To complex", I found that the following thing is accepted by MSVC STL (Godbolt link).
#include<complex>intmain() {
auto [xy] = std::complex<double>{};
}
Currently, MSVC STL's complex satisfies the conditions in [dcl.struct.bind]/8 - it has only one data member of type value_type[2] which is public and inherited from its base class.
Since C++26, the aforementioned example will certainly stop working. Do we want to reject it in old modes by making something private? Given complex doesn't seem able to be passed or returned in registers, perhaps such change is ABI-compatible.