// Iterator_identity.C
// ----------------------------------------------------------------
// COMP 290-001: Algorithm Library Design, Lutz Kettner, 01/11/2000
// Test of the identity iterator adaptor.

#include "Iterator_identity.h"
#include <assert.h>
#include <list>
#include <algorithm>

int main() {
    std::list<int> ls;
    ls.push_back(42);
    ls.push_back(43);
    ls.push_back(44);
    std::list<int> ls2( ls);
    std::reverse( ls.begin(), ls.end());

    typedef std::list<int>::iterator    Iterator;
    typedef Iterator_identity<Iterator> It_id;
    std::reverse( It_id( ls.begin()), It_id( ls.end()));
    
    assert( ls == ls2);
}

// EOF //

