Subject: Re: [boost] Call for interest - BOOST_AUTO_FUNCTION
From: David Abrahams (dave_at_[hidden])
Date: 2010-10-17 22:27:22
At Sun, 17 Oct 2010 14:34:48 -0400,
Matt Calabrese wrote:
> 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
Right, you should be writing your requirements in terms of concepts if
you have that facility.
> but BOOST_AUTO_FUNCTION doesn't suffer from that problem at all
> since "requires" comes after the parameter list.
BTW, seems like you're close enough; it's probably time to integrate
concept support for a future BCCL.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk