Re: [Boost-bugs] [Boost C++ Libraries] #315: Implement operator[] for Tokenizer

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #315: Implement operator[] for Tokenizer
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-24 08:54:48


#315: Implement operator[] for Tokenizer
-------------------------------+--------------------------------------------
  Reporter: nobody | Owner: jsiek
      Type: Feature Requests | Status: new
 Milestone: | Component: regex
   Version: None | Severity: Problem
Resolution: None | Keywords:
-------------------------------+--------------------------------------------
Changes (by johnmaddock):

  * owner: johnmaddock => jsiek
  * status: assigned => new
  * severity: => Problem

Old description:

> {{{
> I constantly find myself creating this structure:
>
> tokenizer tok(str, sep);
> vector<string> s;
> for(tokenizer::iterator iter=tok.begin();
> iter!=tok.end(); ++iter) {
> s.push_back(*iter);
> }
>
> Why not just:
> tok[0];
>
> to retrieve the first token?
>
> (Darel Finkbeiner <darel.finkbeiner_at_[hidden]>)
>
> }}}

New description:

 {{{
 I constantly find myself creating this structure:

 tokenizer tok(str, sep);
 vector<string> s;
 for(tokenizer::iterator iter=tok.begin();
 iter!=tok.end(); ++iter) {
   s.push_back(*iter);
 }

 Why not just:
 tok[0];

 to retrieve the first token?

 (Darel Finkbeiner <darel.finkbeiner_at_[hidden]>)

 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/315#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC