@@ -141,7 +141,7 @@ NOTES:
141141 natvis error debug output is enabled in the options).
142142 So instead this visualizer accepts EVERY tiny::optional_flag_manipulator<T, void>. If T is bool, float or double,
143143 the "overloads" above are used. If T is anything else, this here is used. The trick to check whether T is a pointer
144- or not is in the definition of the IsEmpty() intrinsic: We do *& mStorage.storage, which is invalid if storage is not
144+ or not is in the definition of the IsEmpty() intrinsic: We do &* mStorage.storage, which is invalid if storage is not
145145 a pointer. Then, the condition "IsEmpty() || !IsEmpty()" is always true for a pointer and undefined for non-pointers.
146146 In case of undefined, the Optional="true" comes into play.
147147 Note: Using pure natvis, it is impossible to properly query the IsEmpty flag. Natvis does not allow to call functions,
@@ -152,7 +152,7 @@ NOTES:
152152 <Intrinsic Name =" IsEmpty" Optional =" true" Expression ="
153153 sizeof(& *mStorage.storage) == 4
154154 ? ((unsigned int)(void*)mStorage.storage) == 0xffffffff - 8
155- : ((unsigned long long)(void*)mStorage.storage) == 0xffff800000000000ull - 1
155+ : ((unsigned long long)(void*)mStorage.storage) == 0x7fffffffffffffffull
156156 " />
157157 <!-- Used for pointers-->
158158 <DisplayString Optional =" true" Condition =" IsEmpty() || !IsEmpty()" >{*this,view(TinyOptionalInplaceStorageView)}</DisplayString >
@@ -176,7 +176,7 @@ NOTES:
176176 <Intrinsic Name =" IsEmpty" Optional =" true" Expression ="
177177 sizeof(& **(FlagType*)(((unsigned char*)& mStorage.storage) + $T2)) == 4
178178 ? ((unsigned int)(void*)*(FlagType*)(((unsigned char*)& mStorage.storage) + $T2)) == 0xffffffff - 8
179- : ((unsigned long long)(void*)*(FlagType*)(((unsigned char*)& mStorage.storage) + $T2)) == 0xffff800000000000ull - 1
179+ : ((unsigned long long)(void*)*(FlagType*)(((unsigned char*)& mStorage.storage) + $T2)) == 0x7fffffffffffffffull
180180 " />
181181 <!-- Used for pointers-->
182182 <DisplayString Optional =" true" Condition =" IsEmpty() || !IsEmpty()" >{*this,view(TinyOptionalInplaceStorageView)}</DisplayString >
0 commit comments