-
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
Finish Fixing Atomic Initialization #390
Conversation
You can generate a message on macro use like this:
It doesn't count as a warning from compiler's perspective though (doesn't turn into error with |
You can use a type to differentiate the use of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure that test coverage is similarly made unconditional (we currently have Clang-only test coverage). Perhaps more importantly, we need a test to validate that C1XX correctly constant-initializes at least atomic<int>
, atomic<bytes<3>>
, atomic<bytes<23>>
, and atomic_flag
.
(I'm personally not disturbed by the inability to annotate the macros as deprecated.)
Co-Authored-By: Casey Carter <cartec69@gmail.com>
I agree we don't need to bend over backwards to mark the macro as deprecated. |
@CaseyCarter AFAIK the compiler that ships with 2019 16.5 Preview 2 should have that fixed, so I think we can merge this as soon as that ships. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me! While I'm the staunchest advocate of emitting deprecation warnings, I believe that attempting to do so for the macros would be more trouble than it's worth.
Merging should wait for VS 2019 16.5 Preview 2's release due to the compiler bugfix dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal tests passed. Will merge as soon as 2019 16.5 Preview 2 is available.
# Conflicts: # stl/inc/yvals_core.h
Thanks for your contribution! |
Description
Resolves #336. The only problem is that I don't know how to signal deprecation of
ATOMIC_VAR_INIT
andATOMIC_FLAG_INIT
macros.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.
_Ugly
as 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.