
----Original Message---- From: Daryle Walker [mailto:darylew@hotmail.com] Sent: 18 September 2005 20:54 To: Boost mailing list Subject: Re: [boost] [Review] xpressive
Making something like:
std::copy( pieces.begin(), pieces.end(), destination );
completely useless isn't unfriendly?
You'll have to use a (mutable) object to store "pieces.begin()" so you can increment it before the copy
??? Why can't you use: std::copy( ++pieces.begin(), pieces.end(), destination ); -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434

On 9/19/05 4:58 AM, "Martin Bonner" <martin.bonner@pitechnology.com> wrote:
----Original Message---- From: Daryle Walker [mailto:darylew@hotmail.com] Sent: 18 September 2005 20:54 To: Boost mailing list Subject: Re: [boost] [Review] xpressive
Making something like:
std::copy( pieces.begin(), pieces.end(), destination );
completely useless isn't unfriendly?
You'll have to use a (mutable) object to store "pieces.begin()" so you can increment it before the copy
??? Why can't you use: std::copy( ++pieces.begin(), pieces.end(), destination );
1. "pieces.begin()" is a temporary, so you can't use "++" directly. You could use something like "boost::next", though. 2. Any such increment is illegal if "pieces" is empty. 3. It isn't template friendly if you pass in the container instead of an iterator pair (since element-0 has a different nature than the other elements). -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
participants (2)
-
Daryle Walker
-
Martin Bonner