Boost logo

Boost :

Subject: Re: [boost] Call for interest - BOOST_AUTO_FUNCTION
From: Robert Kawulak (robert.kawulak_at_[hidden])
Date: 2010-10-06 20:59:00

> From: Matt Calabrese
> The frustrating thing is that I'm pretty sure most people who first hear
> about auto when applied to function templates assume that it would mean
> something along the lines of what the macro does, and then they are
> disappointed to find out that that is not the case. I agree that for
> arbitrarily long functions with many statements and returns it would not be
> appropriate, but for 1-liners it seems like something that's both an
> extremely common case and trivial for compilers to implement. At least for
> me, it seems that the vast majority of the times one wants to use the
> function arguments when specifying the return type it is to duplicate the
> expression in a return statement exactly anyway. Was such an idea simply
> never proposed despite everyone I've talked to expecting it to be there? It
> wouldn't surprise me if the next standard remedied this, but at the moment
> that seems light years away.

If a national body would point it out as a defect in its comments, wouldn't that be a thing small enough to fix it before the final
draught? Just thinking aloud, I don't know if it sounds reasonable at this stage of standardisation process.

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at