Policy Based Design Using C++ Typemaps
1.0.1
namespace typemap {
  namespace typemap_private {
    
    template 
    struct insert_ {
      typedef item_ Item ;
      typedef typename insert_::X X ;
    } ;
  
    // case when element was found
    template 
    struct insert_ {
      typedef I R ;  // reversed
      typedef typename erase_front_::X E ;
      typedef typename push_front::X P ;
      typedef typename concat_::X X ;
    } ;
  
    // case when element was not found
    template 
    struct insert_ {
      typedef typename push_front::X X ;
    } ;
  }
}

 
Copyright (C) 2005,2006,2013 Andre Mirzoyan