[webkit-dev] const_iterator

Darin Adler darin at apple.com
Wed Nov 30 17:04:37 PST 2011


On Nov 30, 2011, at 1:35 PM, David Levin wrote:

> All of this seems to apply equally to const_iterator as well.

I don’t think it does.

> Are you mildly opposed to it as well? Or is something different about it?

It seems to me that const_iterator is analogous to pointer-to-const and const member functions. These are used in WebKit and the issues are different than for const local variables. It’s about whether the pointed-to thing can be changed, not whether a local variable can change. When the thing in question is not local, const is far more valuable.

> An additional current downside for const_iterator is that hashtable const_iterator has an unfortunate issue where it can't be compared ==, != to an iterator which isn't nice. https://bugs.webkit.org/show_bug.cgi?id=73370

Sounds easy to fix.

-- Darin


More information about the webkit-dev mailing list