<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Wed., 18 Apr. 2018, 1:00 pm Walter Bright via Digitalmars-d, <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 4/8/2012 7:29 AM, Andrei Alexandrescu wrote:<br>
> On 4/8/12 1:33 AM, Daniel Murphy wrote:<br>
>> - Would generate false pointers<br>
> Fair point but we're also moving to precise collection :o).<br>
<br>
<br>
I don't know of a good generic way to do precise collection with unions.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I wonder if precise collectors could leverage runtime support for ambiguous cases? opPreciseCollect() which might return an array of pointers contained in T, which would allow runtime logic to determine how the union should be interpreted... Or maybe the function should receive a delegate which the function should call on each embedded pointer.</div><div dir="auto"><br></div><div dir="auto">I'm sure some standardised runtime support function can help out in these cases...</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>