You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/06/10 15:51:37 UTC

[GitHub] [trafficserver] SolidWallOfCode opened a new pull request #7934: Internal DLL container forward iterators

SolidWallOfCode opened a new pull request #7934:
URL: https://github.com/apache/trafficserver/pull/7934


   Add forward iterators to `DLL` to make it easier to use, as a temporary measure until we can replace it with an STL container.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] SolidWallOfCode edited a comment on pull request #7934: Internal DLL container forward iterators

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode edited a comment on pull request #7934:
URL: https://github.com/apache/trafficserver/pull/7934#issuecomment-858817671


   I wouldn't do that. I'd do something (in `Trie`) like
   ```
   using cont_iterator = typename Queue<T>::const_iterator;
   const_iterator begin() const { m_value_list.begin(); }
   const_iterator end() const { m_value_list.end(); }
   ```
   One of the points of having an iterator class is to keep the container protected.
   
   * Woops, forgot a `typename` is needed there because it's a template.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] sudheerv commented on pull request #7934: Internal DLL container forward iterators

Posted by GitBox <gi...@apache.org>.
sudheerv commented on pull request #7934:
URL: https://github.com/apache/trafficserver/pull/7934#issuecomment-858827508


   > I wouldn't do that. I'd do something (in `Trie`) like
   > 
   > ```
   > using cont_iterator = Queue<T>::const_iterator;
   > const_iterator begin() const { m_value_list.begin(); }
   > const_iterator end() const { m_value_list.end(); }
   > ```
   > 
   > One of the points of having an iterator class is to keep the container protected.
   
   Makes sense. This will work too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] SolidWallOfCode commented on pull request #7934: Internal DLL container forward iterators

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on pull request #7934:
URL: https://github.com/apache/trafficserver/pull/7934#issuecomment-858817671


   I wouldn't do that. I'd do something (in `Trie`) like
   ```
   using cont_iterator = Queue<T>::const_iterator;
   const_iterator begin() const { m_value_list.begin(); }
   const_iterator end() const { m_value_list.end(); }
   ```
   One of the points of having an iterator class is to keep the container protected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] SolidWallOfCode merged pull request #7934: Internal DLL container forward iterators

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode merged pull request #7934:
URL: https://github.com/apache/trafficserver/pull/7934


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org