|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
digitalmars.D.dtl - The limitations of foreach
I've been kicking around how to "D-ify" the STL algorithms and ran into a snag: foreach can only iterate across one range at a time while some of the STL algorithms want to iterate across two simultaneously. I'm thinking of things like lexicographical_compare and such. On the surface this seems like a strong argument for iterators, but I'm wondering if there might be a more D-like way to handle these. Any suggestions? Sean Aug 03 2004
Sean Kelly wrote:Any suggestions? Aug 03 2004
"Sean Kelly" <sean f4.ca> wrote in message news:ceoq1l$1hov$1 digitaldaemon.com...I've been kicking around how to "D-ify" the STL algorithms and ran into a snag: foreach can only iterate across one range at a time while some of the STL algorithms want to iterate across two simultaneously. I'm thinking of things like lexicographical_compare and such. On the surface this seems like a strong argument for iterators, but I'm wondering if there might be a more D-like way to handle these. Any suggestions? Aug 03 2004
|