From LPTMS Wiki
Revision as of 11:25, 11 February 2011 by Roux (talk | contribs)

Jump to: navigation, search

Pointers handling

pointers are not always easy to handle, particularly for destruction, memory management... There exists some solutions provided by boost

  • Smart pointers
  • [www.boost.org/doc/libs/release/libs/ptr_container Pointer containers] (vector, list, deque...)

testing c++ source display:

template<typename T> class B
  T t;
  B(T const& _t) : t(_t) {};
  T value() const {return t;};

int main()
   B<int> b(2);