Newsgroup: comp.lang.c++
Subject: When to prefer "for_each"?
From: ram@...
Date: 15 Nov 2013 16:54:34 GMT
In the web, I found a text claiming that
for( ...::iterator i = ....begin(); ... )...
was ?old C++?, while
for_each( ..., [&]... )...
was ?new C++?. So, in the general case, is there any advantage
in using ?for_each? instead of ?for? for such loops?
Subject: When to prefer "for_each"?
From: ram@...
Date: 15 Nov 2013 16:54:34 GMT
In the web, I found a text claiming that
for( ...::iterator i = ....begin(); ... )...
was ?old C++?, while
for_each( ..., [&]... )...
was ?new C++?. So, in the general case, is there any advantage
in using ?for_each? instead of ?for? for such loops?
via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?129143-When-to-prefer-for_each&goto=newpost
View all the progranning help forums at:
http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums
No comments:
Post a Comment