Subject: Re: [boost] Call for interest - BOOST_AUTO_FUNCTION
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2010-10-18 04:41:04
On Mon, Oct 18, 2010 at 12:47 AM, Matt Calabrese <rivorus_at_[hidden]> wrote:
> Can't you just detect whether "return" was used, and if not, sythesize
>> the "end" internally?
> No. The problem is that end is what closes off the return type (it closes
> off a decltype). With each ( requires stuff_here ) or similar, it adds more
> to the return type and then the last thing it does is specify the name of a
> macro. The next ( arguments_here ) applies that macro and does the same
> thing. At a return, everything is closed off and a definition is provided,
> which is why you don't need an end there, but you can't do that otherwise
> since it's possible that more arguments will be passed. The macro can't know
> in advance the next thing the user will pass -- it could be a semicolon, or
> it could be a return, or it could be a requires, or something else.
> -Matt Calabrese
I could change the way the macro works by making it one single macro
invocation. That's probably the better solution even though it was something
I originally wanted to avoid. Not having to put "end" is a good enough
reason for me to change the design.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk