
18 Oct
2010
18 Oct
'10
10:45 p.m.
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