On Tue, Nov 27, 2018 at 9:59 PM Matthew Woehlke <[email protected]> wrote:
> Right. Mostly. Note that in my original example, I was supplying a > pointer to a member of my model. This seems like an odd thing to do. How I usually operate is to have the model as proxy for the actual data storage. > Because index() is const, when I take > that address, I get a const pointer, even though the member itself isn't > const (and it would be okay for me to cast it to non-const when using it > in a non-const member). > > It sounds like Jean-Michaël ran into the exact same problem. > True. I wonder why I haven't hit such a case, or maybe I have but just have forgotten about it ... The point is, the pointer is going to be coerced into a quintptr anyway, > so there is no particular reason why we *shouldn't* accept a const > pointer as the data... not having that overload just forces the user to > explicitly recast the pointer themselves. > Indeed. Sounds reasonable, to me at least, to add an overload.
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
