Skip to content
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

add STL4038 prefix to "requires C++NN or later" messages #2061

Merged
merged 29 commits into from
Jul 28, 2022

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Jul 15, 2021

Fixes #155

@fsb4000 fsb4000 requested a review from a team as a code owner July 15, 2021 14:22
stl/inc/any Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Jul 16, 2021
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
stl/inc/source_location Show resolved Hide resolved
@strega-nil-ms
Copy link
Contributor

Thanks much!

@strega-nil-ms strega-nil-ms changed the title add STL prefix add STL4038 prefix to "requires C++NN or later" messages Jul 22, 2022
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
stl/inc/coroutine Outdated Show resolved Hide resolved
stl/inc/coroutine Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

Thanks, this looks good! I pushed a conflict-free merge with main, verified that we haven't added any headers that need to be updated, and pushed minor changes. The most significant change was using a new number for <coroutine>'s message about not being compatible with legacy /await, and emitting that multi-sentence message on a single line. Now its messages look like this to users:

D:\GitHub\STL>type meow.cpp
#include <coroutine>

D:\GitHub\STL>cl /EHsc /nologo /W4 /std:c++14 /c meow.cpp
meow.cpp
D:\GitHub\STL\out\build\x64\out\inc\coroutine(22): warning STL4038: The contents of <coroutine> are available only with C++20 or later or /await:strict.

D:\GitHub\STL>cl /EHsc /nologo /W4 /std:c++14 /await /c meow.cpp
meow.cpp
D:\GitHub\STL\out\build\x64\out\inc\coroutine(17): warning STL4039: The contents of <coroutine> are not available with /await. Remove /await or use /await:strict for standard coroutines. Use <experimental/coroutine> for legacy /await support.

FYI @strega-nil-ms as I pushed this after you approved; I believe it should be non-controversial but please meow if you have concerns.

@strega-nil-ms
Copy link
Contributor

@StephanTLavavej LGTM!

image

@StephanTLavavej StephanTLavavej self-assigned this Jul 27, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit dc29e30 into microsoft:main Jul 28, 2022
@StephanTLavavej
Copy link
Member

Thanks for making these messages easier to document and look up! 😸 📖 💡

@CaseyCarter
Copy link
Contributor

Thanks for making these messages easier to document and look up! 😸 📖 💡

STL4038Thanks!

@fsb4000 fsb4000 deleted the fix155 branch July 28, 2022 04:25
fsb4000 added a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
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.

<optional> <variant> etc. #pragma message for old standard mode should have STL#### prefix
6 participants