# 1 "iterator.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "iterator.c"
# 1 "iterator.h" 1



# 1 "iostream.h" 1



typedef unsigned long streamsize_type;



context ostream( dtype os_type )
{

    os_type *write( os_type *, const char *, streamsize_type );


    int fail( os_type * );
};




context writeable( type T )
{
    forall( dtype os_type | ostream( os_type ) ) os_type * ?<<?( os_type *, T );
};



forall( dtype os_type | ostream( os_type ) ) os_type * ?<<?( os_type *, char );
forall( dtype os_type | ostream( os_type ) ) os_type * ?<<?( os_type *, int );
forall( dtype os_type | ostream( os_type ) ) os_type * ?<<?( os_type *, const char * );




context istream( dtype is_type )
{

    is_type *read( is_type *, char *, streamsize_type );


    is_type *unread( is_type *, char );


    int fail( is_type * );


    int eof( is_type * );
};




context readable( type T )
{
    forall( dtype is_type | istream( is_type ) ) is_type * ?<<?( is_type *, T );
};



forall( dtype is_type | istream( is_type ) ) is_type * ?>>?( is_type *, char* );
forall( dtype is_type | istream( is_type ) ) is_type * ?>>?( is_type *, int* );
# 5 "iterator.h" 2


context iterator( type iterator_type, type elt_type )
{

    iterator_type ?++( iterator_type* );
    iterator_type ++?( iterator_type* );


    int ?==?( iterator_type, iterator_type );
    int ?!=?( iterator_type, iterator_type );


    lvalue elt_type *?( iterator_type );
};



forall( type elt_type | writeable( elt_type ),
        type iterator_type | iterator( iterator_type, elt_type ),
        dtype os_type | ostream( os_type ) )
void write_all( iterator_type begin, iterator_type end, os_type *os );
# 2 "iterator.c" 2

forall( type elt_type | writeable( elt_type ),
        type iterator_type | iterator( iterator_type, elt_type ),
        dtype os_type | ostream( os_type ) )
void
write_all( elt_type begin, iterator_type end, os_type *os )
{
    os << begin;
}
