You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two fields in Element that are potentially redundant. We have pointer, an optional uintptr_t, and data which is a variant potentially containing a struct Pointer { uintptr_t p; };.
std::variant<std::nullopt_t, Pointer, Scalar, std::string> data = {
std::nullopt};
The question of which field is better depends on if we want to be able to store field data as well as pointer data. I suspect that we might for memory layout data along with value capture. In that case, we should probably remove the pointer field from the data variant and set pointer itself instead. If we never need both data and a pointer, we could drop the pointer field and always use the variant.
The text was updated successfully, but these errors were encountered:
There are two fields in
Element
that are potentially redundant. We havepointer
, an optionaluintptr_t
, and data which is a variant potentially containing astruct Pointer { uintptr_t p; };
.object-introspection/include/oi/result/Element.h
Lines 50 to 52 in 4c6f232
The question of which field is better depends on if we want to be able to store field data as well as pointer data. I suspect that we might for memory layout data along with value capture. In that case, we should probably remove the pointer field from the data variant and set pointer itself instead. If we never need both data and a pointer, we could drop the pointer field and always use the variant.
The text was updated successfully, but these errors were encountered: