-
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
<locale>: locale's copy assignment has incorrect return type #268
Comments
May I work on this issue? |
That's a good question. @CaseyCarter, do you believe that this bug can be fixed while preserving binary compatibility, or is The MSVC-internal build system that we're working on porting to CMake contains automated checks to verify that The weird calling convention macros like @lozinska - I think you can go ahead and submit a PR, and we'll run internal testing to verify it. Thanks for checking! |
It doesn't seem to be - That said, it's not 100% clear to me if we should correct this discrepancy by changing the return type in our implementation or by changing the return type in the Standard. The I think I've talked myself into this being "LWG issue needed" rather than "bug". Sorry for the confusion - this came to my attention while reviewing a change to adjacent wording last week and I didn't have time to give it thought other than to simply record the issue. I suppose there's no reason we couldn't fix the bug now - it does seem as simple as adding |
Addresses #268 by changing the implementation to match the current Standardese.
As @lozinska has fixed our implementation to conform to the current Standardese, the remaining work here is to file an LWG issue. |
I've submitted an LWG issue with a Proposed Resolution and I'll resolve this when it's posted to the issues list. |
Filed as LWG-3353. |
Per [locale],
std::locale
's copy assignmentstd::locale::operator=(const locale&)
should return a constant lvalue that denotes*this
. We incorrectly return a non-const
lvalue:STL/stl/inc/xlocale
Line 357 in 9d635aa
Command-line test case
https://godbolt.org/z/bkFbL-
The text was updated successfully, but these errors were encountered: