This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Howard Hinnant wrote:The issue of exactly what convertible to T should cover is library issue
Such an iterator would only qualify as an input iterator, but otherwise I think would be conforming, reference 24.1.1p2, table row:
*a convertible to T
484, it looks like the whole issue is "up in the air" and there is say
exactly what is supposed to work (in particular, is it "our job" to
force conversion to the value_type or not), and what isn't, is supposed
to be handled as part of the iterator redesign.
Chris
I am personally tempted to say that any iterator where "*a == *b" doesn't work is probably so broken we shouldn't be going to the effort to force it to work...
While making this work could very well be a reasonable goal, I notice that if I replace the calls to equal with std::equal, defined in the obvious way:
template<typename _InputIterator1, typename _InputIterator2> inline bool equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; return true; }
Then this proxy iterator doesn't work, so we aren't breaking anything that worked before...
while(a!=b && *a!=0)
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |