Boost logo

Boost :

Subject: Re: [boost] Call for interest - BOOST_AUTO_FUNCTION
From: David Abrahams (dave_at_[hidden])
Date: 2010-10-18 18:45:33


At Mon, 18 Oct 2010 17:55:44 -0400,
Matt Calabrese wrote:
>
> What I'm proposing is that I support syntax something along the lines of
> this:
>
> template< typename T >
> BOOST_AUTO_FUNCTION( ( foo( T& arg ) )
> ( do // "do" is just the parameter ID like "requires" and "return"
> ++arg;
> std::cout << arg;
> // Do as much stuff as you want
> ))

Yeah, but the prospect of seeing "do do" in my code isn't very
appetizing to me

template< typename T >
BOOST_AUTO_FUNCTION( ( foo( T& arg ) )
( do do { ++arg; } while(arg < 0);
))

but I guess that's not very likely ;-)

> I'm also not sure that "do" would be a good idea to use in this context, as
> it may end up being confusing.

or... embarrassing ;-)

-- 
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