Remove unneeded check if (this != _STD addressof(_Right))#3540
Remove unneeded check if (this != _STD addressof(_Right))#3540StephanTLavavej merged 1 commit intomicrosoft:mainfrom
if (this != _STD addressof(_Right))#3540Conversation
There was a problem hiding this comment.
What about a move assignment above the one you fixed. Can you delete it?
Line 3256 in 994f941
No. Look at https://eel.is/c++draft/unique.ptr.single.asgn We must have 3 assignment operators. constexpr unique_ptr& operator=(unique_ptr&& u) noexcept;
Lines 3262 to 3269 in 994f941 template<class U, class E> constexpr unique_ptr& operator=(unique_ptr<U, E>&& u) noexcept;
Lines 3252 to 3260 in 994f941 constexpr unique_ptr& operator=(nullptr_t) noexcept;Lines 3212 to 3215 in 994f941 |
|
I see, appreciate it |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Thanks for eliminating this branch in a widely used member function! 🌴 🪓 😸 |
Fixes #3538