conceptg++ class_temp_in_temp.cpp
class_temp_in_temp.cpp: In instantiation of 'reverse_iterator<Iter1>':
class_temp_in_temp.cpp:22:   instantiated from here
class_temp_in_temp.cpp:6: error: no type named 'reference' in 'struct Iter1'
class_temp_in_temp.cpp: In function 'Iter1 find_end(Iter1, Iter1, Iter2, Iter2)':
class_temp_in_temp.cpp:22: error: '__rlast1' has incomplete type


#include <concepts>

  template<typename _Iterator>
    class reverse_iterator
    {
      typedef typename _Iterator::reference reference;
    };

  concept Bidirectional<typename X>
  {
    typename reference = X::reference;
  };

  template<Bidirectional Iter1, Bidirectional Iter2>
  Iter1
  find_end(Iter1 __first1,
   Iter1 __last1,
   Iter2 __first2,
   Iter2 __last2)
  {
    typedef reverse_iterator<Iter1> _RevIterator1;
    _RevIterator1 __rlast1(__first1);
  }

  int main() { }

______________________________________
Jeremy Siek <jeremy.siek@colorado.edu>
http://www.cs.colorado.edu/~siek/
Visiting Assistant Professor
Department of Computer Science
University of Colorado at Boulder