On Sunday, 31 August 2014 at 13:47:42 UTC, Dmitry Olshansky wrote:
What do you guys think?

I'd say add "trusted" to those function names:
"trustedCall"
"trustedAddrOf"

Because:
- "call" could mean a lot of things. It's not imidiatly obvious that it is meant for being trusted. - "addrOf" is *also* used as an alternative for "&", especially in generic code, when you need the address of an attribute, as that attribute could actually be a property function. EG:
auto p = addrOf(r.front);
Nothing here implies trust.

Also, implementation wise, wouldn't it be possible to instead make `call` a template aliases itself away to `fun`, but with different attributes? The `auto fun(Args)(auto ref Args args)` tube approach has the disadvantages that it:
- prevents return by ref
- fails perfect forwarding of lvalues into rvalues.

Reply via email to