C++ Logo


Advanced search

Re: Attribute view

From: Martin Küttler <mkuettle_at_[hidden]>
Date: Fri, 20 Dec 2019 21:38:49 +0100
> We already have one:
> http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1179r1.pdf

Thank you, that's quite interesting. I think the ideas are similar
enough in effect (even though they use different means) that it doesn't
make much sense to propose both. Given that Herbs idea is much more
fleshed out, and - I think - more general, I withdraw mine. I think
under these circumstance it doesn't make sense to describe details of my
idea. Just a general remark: I think that the lifetime extension of
temporaries can be added to most (all?) schemes. If the compiler has a
reasonable idea of when a view-object is bound to temporary, it can do
that, if it is considered worthwhile.

A question that I have regarding the proposal above - and that should
probably be directed to Herb (should I send him an email directly?) - is
if it is possible and worth the effort to allow different pointer/owner
flags for different members. The way I see it, the current proposal
intends for one such flag (or none) per class - mostly automatically
inferred, it says. Having multiple would (probably) make it a superset
of this idea, but raise new issues - e.g. how to modify the p-sets when
a member function is called. Maybe this is a none-issue in practice,
though, because classes acting as both pointers/views and owners (of
other content) or views to multiple places don't occur often.


Received on 2019-12-20 14:41:23