[Effective-cpp] Item 1: Uses and Abuses of vector

Terje Slettebo tslettebo at broadpark.no
Sat Oct 23 12:29:27 EDT 2004


>From: "Bronek Kozicki" <brok at rubikon.pl>

> nice, but lack of "const" troubles me - I know this language limitation,
> anyway. I also do not like for_each, for reasons stated by Paul. More
> general reason is that std::for_each, like std::transform, can be used
> to do anything with your container(s) - I do not like that this
> "anything" is not visible in place where it actually counts. If local
> class could be used as a template parameter (again, I believe it's under
> committee's consideration) I would not have such problem.

Libraries like BLL, allowing you to create function objects on the fly, I
think reduces or eliminates the need for being able to use local classes as
template parameters, since with BLL, you don't even need to explicitly
define the class before use.

Besides, the latest I've heard about that proposal
(http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2003/n1427.pdf) is that
it has been moved to the committee's "inactive" list, unless more work is
done on it.

Regards,

Terje




More information about the Effective-cpp mailing list