On Thursday, 3 May 2012 at 10:03:55 UTC, Jens Mueller wrote:
What is a good solution when using member functions on a range's/container's element?Note, the problem only applies when storing structs because classesbehave like references.
I think in this case, it might make sense to store pointers to structs.
So, auto c = R!(Point*)(10); OR alias Point* PointRef; auto c = R!PointRef(10); Let me know if there's something wrong with this approach.