Skip to content

Conversation

@StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Mar 1, 2021

Fixes #1702.

  1. Moving _NODISCARD before _CRT_SATELLITE_1/_CRT_SATELLITE_2 will allow @JonCavesMSFT to activate this new warning. There's no user impact because _CRT_SATELLITE_1/_CRT_SATELLITE_2 expand to nothing when importing.
  2. move_iterator::operator->() wasn't following the convention of [[deprecated]] occurring before [[nodiscard]]. There's no impact to rearranging these attributes, it just makes the codebase more consistent (and slightly more readable, since it gets the verbose deprecation macro out of the way).

@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Mar 1, 2021
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner March 1, 2021 00:49
This reverts commit 7fae2aa.

Clang was rejecting this with:

D:\build\out\inc\xlocale(848,1): error: declaration of anonymous class must be a definition
class _CXX20_DEPRECATE_CODECVT_FACETS _CRTIMP2_PURE_IMPORT_UNLESS_CODECVT_ID_SATELLITE
^
D:\build\out\inc\xlocale(849,27): error: expected unqualified-id
    codecvt<char16_t, char, mbstate_t> : public codecvt_base {
                          ^
D:\build\out\inc\xlocale(1147,1): error: declaration of anonymous class must be a definition
class _CXX20_DEPRECATE_CODECVT_FACETS _CRTIMP2_PURE_IMPORT_UNLESS_CODECVT_ID_SATELLITE
^
D:\build\out\inc\xlocale(1148,27): error: expected unqualified-id
    codecvt<char32_t, char, mbstate_t> : public codecvt_base {
                          ^
@StephanTLavavej StephanTLavavej merged commit 2e4ad02 into microsoft:main Mar 2, 2021
@StephanTLavavej StephanTLavavej deleted the nodiscard_the_first_avenger branch March 2, 2021 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_NODISCARD should appear before __declspec

3 participants