Fix issue-268: change return type from non-const to const#324
Fix issue-268: change return type from non-const to const#324StephanTLavavej merged 1 commit intomicrosoft:masterfrom
Conversation
StephanTLavavej
left a comment
There was a problem hiding this comment.
Thanks! This changes our implementation to do what the Standard says, and I've verified with Wandbox and Compiler Explorer that libstdc++ and libc++ behave identically. There's a very low risk of source breakage from this change - assignment expressions are sometimes used in chained assignments (where this would continue to work) and occasionally used in other expressions, but typically not in modifying ways. I believe we should go ahead and merge this; we can always go back to the old signature if and when an LWG issue is filed and resolved.
BillyONeal
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
|
I'm porting this to our Microsoft-internal repo in order to run a full build and test pass. |
|
Everything passed, thanks again for the fix! |
Description
Update return type of
locale&toconst locale&Fixes #268.
Checklist
Be sure you've read README.md and understand the scope of this repo.
If you're unsure about a box, leave it unchecked. A maintainer will help you.
_Uglyas perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before automated testing is enabled on GitHub,
leave this unchecked for initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
the C++ Working Draft (including any cited standards), other WG21 papers
(excluding reference implementations outside of proposed standard wording),
and LWG issues as reference material. If they were derived from a project
that's already listed in NOTICE.txt, that's fine, but please mention it.
If they were derived from any other project (including Boost and libc++,
which are not yet listed in NOTICE.txt), you must mention it here,
so we can determine whether the license is compatible and what else needs
to be done.