Lines Matching defs:GoodIter
332 // expected-note@+2 {{candidate function not viable: no known conversion from 'GoodIter' to 'Iter0' for 1st argument}}
344 class GoodIter {
346 GoodIter() {}
347 GoodIter(const GoodIter &) {}
348 GoodIter(int fst, int snd) {}
349 GoodIter &operator=(const GoodIter &that) { return *this; }
350 GoodIter &operator=(const Iter0 &that) { return *this; }
351 GoodIter &operator+=(int x) { return *this; }
352 explicit GoodIter(void *) {}
353 GoodIter operator++() { return *this; }
354 GoodIter operator--() { return *this; }
356 bool operator<(GoodIter a) { return true; }
357 bool operator<=(GoodIter a) { return true; }
358 bool operator>=(GoodIter a) { return false; }
362 // expected-note@+2 {{candidate function not viable: no known conversion from 'const Iter0' to 'GoodIter' for 2nd argument}}
363 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'GoodIter' for 1st argument}}
364 int operator-(GoodIter a, GoodIter b) { return 0; }
366 GoodIter operator-(GoodIter a) { return a; }
368 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter1' to 'GoodIter' for 1st argument}}
369 GoodIter operator-(GoodIter a, int v) { return GoodIter(); }
370 // expected-note@+1 2 {{candidate function not viable: no known conversion from 'Iter0' to 'GoodIter' for 1st argument}}
371 GoodIter operator+(GoodIter a, int v) { return GoodIter(); }
372 // expected-note@+2 {{candidate function not viable: no known conversion from 'GoodIter' to 'int' for 1st argument}}
374 GoodIter operator-(int v, GoodIter a) { return GoodIter(); }
376 GoodIter operator+(int v, GoodIter a) { return GoodIter(); }
379 GoodIter begin, end;
382 for (GoodIter I = begin; I < end; ++I)
386 for (GoodIter &I = begin; I < end; ++I)
389 for (GoodIter I = begin; I >= end; --I)
393 for (GoodIter I(begin); I < end; ++I)
397 for (GoodIter I(nullptr); I < end; ++I)
401 for (GoodIter I(0); I < end; ++I)
405 for (GoodIter I(1, 2); I < end; ++I)
408 for (begin = GoodIter(0); begin < end; ++begin)
410 // expected-error@+3 {{invalid operands to binary expression ('GoodIter' and 'const Iter0')}}
424 for (GoodIter I = begin; I - I; ++I)
428 for (GoodIter I = begin; begin < end; ++I)
432 for (GoodIter I = begin; !I; ++I)
437 for (GoodIter I = begin; I >= end; I = I + 1)
440 for (GoodIter I = begin; I >= end; I = I - 1)
444 for (GoodIter I = begin; I >= end; I = -I)
449 for (GoodIter I = begin; I >= end; I = 2 + I)
453 for (GoodIter I = begin; I >= end; I = 2 - I)
541 GoodIter begin, end;
542 TC<GoodIter, 100> t1;
543 TC<GoodIter, -100> t2;
545 t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -100>::dotest_lt' requested here}}
546 dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'dotest_gt<GoodIter, 0>' requested here}}