/* { dg-do compile } */ struct input_iterator_tag { }; template struct iterator { typedef _Category iterator_category; }; template struct iterator_traits { typedef typename _Iterator::iterator_category iterator_category; }; template struct __lc_rai { template static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } template static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; template bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef __lc_rai<_Category1, _Category2> __rai_type; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, ++__first2) { if (__comp(*__first1, *__first2)) return true; } } void __assert_fail () throw () __attribute__ ((__noreturn__)); template struct BoundsContainer { }; template class input_iterator_wrapper : public iterator { public: typedef BoundsContainer ContainerType; T* ptr; ContainerType* SharedInfo; input_iterator_wrapper(const input_iterator_wrapper& in) : ptr(in.ptr), SharedInfo(in.SharedInfo) { } bool operator==(const input_iterator_wrapper& in) const { (static_cast ((SharedInfo != __null && SharedInfo == in.SharedInfo) ? 0 : (__assert_fail (), 0))); } bool operator!=(const input_iterator_wrapper& in) const { return !(*this == in); } T& operator*() const { } input_iterator_wrapper& operator++() { } }; struct X { }; bool predicate(const X&, const X&) { return true; } bool test2(input_iterator_wrapper& x) { return lexicographical_compare(x, x, x, x, predicate); }