-
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
P0288R9 move_only_function #2267
P0288R9 move_only_function #2267
Conversation
make sure no uninitialized pointer deletion happens if new throws
@@ -1247,6 +1251,10 @@ union alignas(max_align_t) _Move_only_function_data { | |||
// Treat a small function as if it has this size too if it fits and is trivially copyable. | |||
inline constexpr size_t _Minimum_function_size = 2 * sizeof(void*); | |||
|
|||
// The below functions are __stdcall as they are called by pointers from _Move_only_function_base::_Impl_t. | |||
// (We use explicit __stdcall to make the ABI stable for translation units with different calling convention options.) |
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.
stdcall is not the default calling convention...
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.
That's correct - it's not the default calling convention, we just need to choose a fixed calling convention that isn't sensitive to /Gd /Gr /Gz /Gv
. __stdcall
is our usual modern preference as it's reportedly faster than __cdecl
.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for moving the STL's functionality forward to C++23! 😹 🚀 🎉 |
Thansk @AlexGuteniev also from my side (looking forward to use it) Any Idea, when this will be ABI locked? I was considering to play around with the ideas discussed in #2241 over christmas once there is a merged baseline. |
@MikeGitb , as |
Out of other good news, regarding devirtualization in vtable emulation. |
Resolve #2241