Boost logo

Boost :

Subject: Re: [boost] Call for interest - BOOST_AUTO_FUNCTION
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2010-10-17 14:34:48


On Sun, Oct 17, 2010 at 5:34 AM, David Abrahams <dave_at_[hidden]> wrote:

> I'm all for embarrassing the designers of the language feature by
> building macros that work better :-) Maybe, like BOOST_FOREACH,
> they'll turn back into language features one day.

Heh, perhaps in C++3x (pending it doesn't roll over to 4x).

When I added the "requires" feature I looked up how "requires" would have
worked in C++0x so that I could try to mimic it as closely as possible. In
doing this, one thing I noticed was that you had to put your "requires"
immediately after template< /**/ > and before the function name and return
type. The downside of this is that it implies that you can't refer to your
arguments in the predicate (I.E. sizeof( left + right ) or something
similar)! Not that such uses would have been very common anyway, but
BOOST_AUTO_FUNCTION doesn't suffer from that problem at all since "requires"
comes after the parameter list.

-- 
-Matt Calabrese

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk