
24 Jun
2011
24 Jun
'11
8:18 p.m.
Now if you want to repeat the operation of inserting the element f( x ), I'm not sure how you do that with Range, but with V2, after learning the syntax, it's relatively straightforward:
( put_front<1>( cont ) % ( _data = f ) % ( _repeat = n ) )( 1, 10, 100, 1000 );
This was suggested, which is probably the best: push_front<1>( cont , _data = f, _repeat = n )( 1, 10, 100, 1000 ); More generally, // Fixed arity: push_front<I>( cont , options... )( a1,...,aI,...,z1,...,zI ); // Variadic push_front( cont , options... )( args1 )...( argsn ); where in each case (fixed and variadic), options... modify the semantics of the subsequent calls to operator().