Repository navigation
weak_ptr conversions can sometimes avoid locking - #2282
Stephan T. Lavavej (StephanTLavavej) merged 28 commits into
Conversation
Resolves microsoft#258 Test happen to recreate the issue for me on attempt #0 if unconditionally avoid locking
rather than C-style casts because we don't need to punch through accessibility
weak_ptr conversions can sometimes avoid locking
|
IIUC this does not optimize for the |
Good point, but I preferred to update the existing check to cover Derived -> const Base as well |
|
S. B. Tam (@cpplearner) I think that Alex Guteniev (@AlexGuteniev)'s code does handle Suppose that we're constructing a template <class _Ty2>
static constexpr bool _Is_virtual_base_cast<_Ty2, decltype(static_cast<const _Ty2*>(_STD declval<_Ty*>()))> = false;This starts with At a high level, the technique is saying that when implicitly converting from source-to-dest (whether adding constness or converting derived-to-base), a (Aside: I noticed that this doesn't consider |
|
For the record, S. B. Tam (@cpplearner) comment was useful, as I added |
|
Thanks for finding the EDG bug! I reported it as DevCom-1564433 and pushed a perma-workaround after discovering that changing |
As we don't need to skip EDG here
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
Alex Guteniev (@AlexGuteniev) Casey Carter (@CaseyCarter) I've pushed changes to fix test failures for |
Having recently begun my fourth trip through the Wheel of Time, I'm deeply offended that you would liken |
|
Thanks for implementing this long-dreamed-of optimization! 🐈 💤 😻 |
Resolves #258
Test happen to recreate the issue for me on attempt #0
if unconditionally avoid locking