#line 537 "/home/travis/build/felix-lang/felix/src/packages/stl.fdoc"
  
  include "stl/stl";
  
  class Stl_List[t]
  {
      requires Cxx_headers::list;
      type stl_list = "::std::list<?1>";
      fun create : unit -> stl_list = "(FLX_GXX_PARSER_HACK std::list<?1>())";
      fun create : int * t -> stl_list= "(FLX_GXX_PARSER_HACK std::list<?1>($1,$2))";
      fun create[i] : i * i -> stl_list = "(FLX_GXX_PARSER_HACK std::list<?1>($1,$2))";
      type stl_list_iterator = "::std::list<?1>::iterator";
      type stl_list_reverse_iterator = "::std::list<?1>::reverse_iterator";
      proc insert: stl_list * stl_list_iterator *  t  = "$1.insert($2,$3);";
      proc push_front : stl_list *  t  = "$1.push_front($2);";
      proc push_back : stl_list *  t  = "$1.push_back($2);";
      fun front : stl_list -> t = "$1.front()";
      fun front : stl_list -> t = "$1.front()";
      proc pop_front : stl_list = "$1.pop_back();";
  // List
    instance Eq[stl_list] {
      fun == : stl_list * stl_list -> bool = "$1==$2";
    }
    instance Container[stl_list,t] {
      fun len: stl_list -> size = "$1.size()";
      fun empty: stl_list -> bool = "$1.empty()";
    }
    instance Sequence[stl_list,stl_list_iterator,t] {
      fun begin : stl_list-> stl_list_iterator= "$1.begin()";
      fun end : stl_list-> stl_list_iterator= "$1.end()";
      proc erase : stl_list * stl_list_iterator = "$1.erase($1);";
      proc erase_between : stl_list * stl_list_iterator * stl_list_iterator = "$1.erase($1,$2);";
      proc clear : stl_list = "$1.clear();";
    }
    instance Reversible_Sequence[stl_list,stl_list_iterator,stl_list_reverse_iterator,t] {
      fun rbegin : stl_list-> stl_list_reverse_iterator= "$1.rbegin()";
      fun rend : stl_list-> stl_list_reverse_iterator= "$1.rend()";
    }
  
  // List iterator
    instance Eq[stl_list_iterator] {
      fun == : stl_list_iterator * stl_list_iterator -> bool = "$1==$2";
    }
    instance Tord[stl_list_iterator] {
      fun < : stl_list_iterator * stl_list_iterator -> bool = "$1<$2";
    }
    instance Iterator[stl_list_iterator,t] {
      fun deref : stl_list_iterator ->  t  = "*(#0*)(void*)&*$1";
    }
    instance Forward[stl_list_iterator] {
      fun succ: stl_list_iterator -> stl_list_iterator = "$1+1";
      proc pre_incr : &stl_list_iterator = "++*$1;";
      proc post_incr : &stl_list_iterator = "++*$1;";
    }
    instance Forward_iterator[stl_list_iterator,t] {}
    instance Bidirectional[stl_list_iterator] {
      fun pred: stl_list_iterator -> stl_list_iterator = "$1-1;";
      proc pre_decr : &stl_list_iterator = "--*$1;";
      proc post_decr : &stl_list_iterator = "--*$1;";
    }
    instance Bidirectional_iterator[stl_list_iterator,t] {}
  
  // List reverse iterator
    instance Eq[stl_list_reverse_iterator] {
      fun == : stl_list_reverse_iterator * stl_list_reverse_iterator -> bool = "$1==$2";
    }
    instance Tord[stl_list_reverse_iterator] {
      fun < : stl_list_reverse_iterator * stl_list_reverse_iterator -> bool = "$1<$2";
    }
    instance Iterator[stl_list_reverse_iterator,t] {
      fun deref : stl_list_reverse_iterator ->  t  = "*(#0*)(void*)&*$1";
    }
    instance Forward[stl_list_reverse_iterator] {
      fun succ: stl_list_reverse_iterator -> stl_list_reverse_iterator = "$1+1";
      proc pre_incr : &stl_list_reverse_iterator = "++*$1;";
      proc post_incr : &stl_list_reverse_iterator = "++*$1;";
    }
    instance Forward_iterator[stl_list_reverse_iterator,t] {}
    instance Bidirectional[stl_list_reverse_iterator] {
      fun pred: stl_list_reverse_iterator -> stl_list_reverse_iterator = "$1-1;";
      proc pre_decr : &stl_list_reverse_iterator = "--*$1;";
      proc post_decr : &stl_list_reverse_iterator = "--*$1;";
    }
    instance Bidirectional_iterator[stl_list_reverse_iterator,t] {}
  
  }
  
  open Stl_List;
  open[t] Reversible_Sequence[
    Stl_List::stl_list[t],
    Stl_List::stl_list_iterator[t],
    Stl_List::stl_list_reverse_iterator[t],t];
  open[t] Bidirectional_iterator[Stl_List::stl_list_iterator[t],t];
  open[t] Bidirectional_iterator[Stl_List::stl_list_reverse_iterator[t],t];