Hello,
 I am using swig2.0 on an ubuntu pangolin platform
with python2.7 and gcc-4.6.

 When I do:
  %import "std_vector.i"
  namespace{
    %template(vecd) vector<double>;
  }

  I have the following error:
     'ptrdiff_t' does not name a type

  I can make it work adding before the
previous piece of code:
    typedef std::ptrdiff_t ptrdiff_t;

  But then I get another error:
     foo_wrap.cxx: In function ‘std::vector<unsigned int, std::allocator<unsigned int> >* std_vector_Sl_uint_Sg____getitem____SWIG_0(std::vector<unsigned int, std::allocator<unsigned int> >*, PySliceObject*)’:
foo_wrap.cxx:4562:48: erreur: ‘SWIGPY_SLICE_ARG’ was not declared in this scope
foo_wrap.cxx: In function ‘void std_vector_Sl_uint_Sg____setitem____SWIG_0(std::vector<unsigned int, std::allocator<unsigned int> >*, PySliceObject*, const std::vector<unsigned int, std::allocator<unsigned int> >&)’:
foo_wrap.cxx:4571:48: erreur: ‘SWIGPY_SLICE_ARG’ was not declared in this scope
foo_wrap.cxx: In function ‘void std_vector_Sl_uint_Sg____setitem____SWIG_1(std::vector<unsigned int, std::allocator<unsigned int> >*, PySliceObject*)’:
foo_wrap.cxx:4580:48: erreur: ‘SWIGPY_SLICE_ARG’ was not declared in this scope
foo_wrap.cxx: In function ‘void std_vector_Sl_uint_Sg____delitem____SWIG_1(std::vector<unsigned int, std::allocator<unsigned int> >*, PySliceObject*)’:
foo_wrap.cxx:4589:48: erreur: ‘SWIGPY_SLICE_ARG’ was not declared in this scope

  Does somebody know how to proceef from here ?
  Thanks in advance