MainComputersProgrammingLanguages › Effective Standard C++ Library: for_each vs. transform

Effective Standard C++ Library: for_each vs. transform

Edit Page
Report
Scan day: 03 March 2014 UTC
-136
Virus safety - good
Description: An article about the difference between for_each and transform in the STL by Klaus Kreft and Angelika Langer, published in the C/C++ Users Journal.
Effective Standard C++ Library: for_each vs. transform | Dr Dobb's Effective Standard C++ Library: for_each vs. transform On the surface, the C++ Standard library algorithms may appear to be quite similar, because they both apply some operation to every element in a sequence. In fact there are significant differences between these two algorithms; ignore them and your code may work okay today but mysteriously crash when you change compilers. The reason for this problem becomes clear as Langer and Kreft detail the differences between these two algorithms. The authors also provide concrete examples of how to use
Size: 621 chars

Contact Information

Phone&Fax:
Address:
Extended:

WEBSITE Info

Page title:Effective Standard C++ Library: for_each vs. transform | Dr Dobb's
Keywords:
Description:On the surface, the C++ Standard library algorithms for_each and transform may appear to be quite similar, because they both apply some operation to every element in a sequence. In fact there are significant differences between these two algorithms; ignore them and your code may work okay today but mysteriously crash when you change compilers. The reason for this problem becomes clear as Langer and Kreft detail the differences between these two algorithms. The authors also provide concrete examples of how to use for_each and transform appropriately. As you may have guessed, the designers of the Standard C++ library were not simply being redundant. They had two different purposes in mind for for_each and transform.
IP-address:192.155.48.108

WHOIS Info

NS
Name Server: NS1.UBM-US.NET
Name Server: NS2.UBM-US.NET
Name Server: NS3.UBM-US.NET
WHOIS
Status: clientTransferProhibited
Date
Creation Date: 25-jun-1998
Expiration Date: 24-jun-2014