// { dg-do compile } template void __distance (_InputIterator); template void distance (_InputIterator, _InputIterator p2) { __distance (p2); } namespace boost { template struct A { typedef typename Iterator::difference_type type; }; template typename T::const_iterator end (T &); template typename T::const_iterator begin (T &); template struct D : A { }; template typename D::type distance (const T &p1) { distance (boost::begin (p1), boost::end (p1)); return 0; } template class B { public: typedef B type; typedef IteratorT const_iterator; }; } typedef int storage_t[]; struct F; template