-
Notifications
You must be signed in to change notification settings - Fork 478
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
atomic_init calls throw deprecation warnings after acceptance of C++20 P0883 #139
Comments
(I'm willing to submit a PR fixing this but any solution I can think of is invasive enough that I want to ask what you want first) |
I'm not sure that placement new is the correct approach for the I guess the cheapest way to initialize the values now is by calling I think the use of I should really replace cancellation_token with stop_token at some stage anyway. |
Ah yes, I missed the For the cancellation_token ones is there a specific reason it's calling malloc rather than new? It looks like new would just do the right thing. |
Oh, because it's using an array of size 1 like a FAM. Disregard! |
It looks like the placement new can be used unconditionally because C++11 even has the constructor taking a T. |
P0883 marks atomic_init as deprecated, which causes cppcoro to throw a bunch of deprecation errors when used with our standard library (post microsoft/STL#390 ).
Should the places calling
atomic_init
be changed to do something like:instead?
The text was updated successfully, but these errors were encountered: