<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
The only way would be what you suggest:<br>
<br>
- extract the attributes from the internal i<br>
- store them in a specially-crafted struct<br>
- return that<br>
- in the external code, catch the returned struct<br>
- extract the artificially stored attributes<br>
- generate a new value with the same attributes.<br>
</div></blockquote>
<br>
You can perhaps encapsulate this in a mixin?</blockquote><div><br></div><div>That would mean two mixins, one internal and one external. Plus, that means every function where I want to propagate UDA has to be crafted exactly for this need.</div>
<div><br></div><div>This is a drag. It seems natural to me that</div><div><br></div><div>int foo(int i) { return i;}</div><div><br></div><div>should forward i attributes. But maybe I need a shift my way to think about attributes. They are attached to declarations, not values...</div>
<div><br></div><div>That's too bad, because declaring UDA is simple, and receiving them with arguments is easy also. There is a fundamental imbalance in having having propagating attributes through functions so difficult.  </div>
</div>