[Bug libstdc++/45549] merge is_iterator into iterator_traits

marc dot glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Mon Sep 6 07:12:00 GMT 2010



------- Comment #2 from marc dot glisse at normalesup dot org  2010-09-06 07:12 -------
(In reply to comment #1)
> __is_iterator can be useful anyway,

Of course, they should use the same helper classes but they can coexist,
although the 2 current uses of is_iterator would disappear. I was personally in
favor of having is_iterator in the standard...

> Anyway, are you sure that, given the current wording in C++0x, such
> iterator_traits is strictly conforming?

Howard seems to think so. The first paragraph of [iterator.traits] is good, the
second one not so good (but it could be argued that the definition is provided
for exposition, that it doesn't have to be copied verbatim to every
implementation). It doesn't seem less conforming than what is used for
next/prev.

But then in some sense it is an extension, as it lets not strictly conforming
code work (but doesn't break any conforming code). Which is why I am asking
about an opinion on a possible enhancement, not calling it a bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45549



More information about the Gcc-bugs mailing list