Subject: Re: [boost] Discovering C++11 lambda argument and result types to construct boost::function
From: Daryle Walker (darylew_at_[hidden])
Date: 2012-02-14 00:35:12
> From: zeratul976_at_[hidden]
> Date: Mon, 13 Feb 2012 22:25:51 +0000
> > A note: if you substitute
> > using signature = R (Arg...);
> > with:
> > typedef R (Arg...) signature;
> > you get a compile time error.
> I believe the correct typedef syntax is:
> typedef R signature(Arg...);
> (This syntax never made sense to me, but it's the only one there was
> prior to C++11).
"signature" goes in the same place a function name would go. The inventors of C copiedthe "declaration the same as usage" syntax from B(PCL).
I warned about making your programming syntax cute; it looks magnificent at first glance,but months later (or sooner) people discover ways the cuteness backfires. (Seestd::vector<bool>.) When I found out (a few months ago) how C got its declaration syntax,I realized that C and C++ programmers have been slammed for decades(!) over the inventor ofB being cute!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk