[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] A stray xmlwrapp question
From: |
Vaclav Slavik |
Subject: |
Re: [lmi] A stray xmlwrapp question |
Date: |
Fri, 09 Apr 2010 15:51:31 +0200 |
Hi,
On Fri, 2010-04-09 at 13:03 +0000, Greg Chicares wrote:
> In xmlwrapp-0.6.0, class xml::const_nodes_view in 'nodes_view.h' contains:
>
> typedef nodes_view::const_iterator iterator;
> typedef nodes_view::const_iterator const_iterator;
>
> I understand the second, but what purpose does the first one serve?
> Its name seems to suggest that it's a non-const iterator, but it isn't.
The name was meant to suggest that it is "iterator over
const_nodes_view". The reason for its existence is convenience:
"xml::const_nodes_view::const_iterator" is redundant and typing it gets
tiresome fast. "xml::const_nodes_view::iterator" removes the noise and
its const-ness is still clear, I think.
Regards,
Vaclav