[Home]STLAlgorithmExtensions/CopyWhile

BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List

No diff available--this is the first major revision. (minor diff, author diff)
Copies elements until last is reached or predicate returns false... e.g.:
 
template<typename InIter, typename OutIter, typename Pred>
OutIter copy_while(InIter first, InIter last, OutIter out, Pred pred)
{
    for (; first != last && pred(*first); ++first)
        *out++ = *first;
    return out;
}


BOOST WIKI | STLAlgorithmExtensions | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited April 19, 2005 3:59 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers