Perfect forwarding

Manu turkeyman at gmail.com
Thu Jul 30 01:43:23 UTC 2020


On Wed, Jul 29, 2020 at 10:55 PM Adam D. Ruppe via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Wednesday, 29 July 2020 at 10:38:29 UTC, Manu wrote:
> > On Wed, Jul 29, 2020 at 9:40 AM Jean-Louis Leroy via
> >> Guaranteed failure then? ;-)
> >
> > Yes.
>
> What's wrong with my solution earlier in the thread?
>

It's pretty good, except my experience is that __parameters works only in
the narrow case of a verbatim forward. I rarely find I need to implement a
verbatim forward; I almost always seem to encounter a forwarding pattern
when it is necessary to perform a parameter transformation of some kind, or
a parameter injection. You need to be able to handle the arguments and
iterate/manipulate them.
I find I'm typically synthesising wrappers or shim's, not verbatim
forwarding... which isn't strictly the topic of this thread, but it's a
100% related problem, and it seems to be what I actually need to do 95% of
the time rather than the challenge in the OP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20200730/88c6e49c/attachment.htm>


More information about the Digitalmars-d mailing list