KDBindings icon indicating copy to clipboard operation
KDBindings copied to clipboard

Handling of members of aggregate types

Open zakalawe opened this issue 2 years ago • 2 comments

When T is an aggregate type, eg struct Rect { int x; int y; int width; int height; }

It would be great to be able to access members of Property<Rect>, i.e that:

Property<Rect> r;
auto widthProp = makeBoundProperty(r.width);

This slightly overlaps with what @lemirep is asking about in #28, except in my case the aggregate does not contain Property<> members. The desired behaviour can be done using a function argument to makeBoundProperty : the question is whether some overload of operator-dot (and ->, presumably) could synthesise the access.

zakalawe avatar Mar 31 '22 15:03 zakalawe