12.07.2015 Views

dangling pointer

dangling pointer

dangling pointer

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

std::auto_ptr and Generic Codetemplatevoid foo(T arg){T temp(arg);// use temp// use arg}std::auto_ptr is obviously not suitable as a template argument for foo().But it is not possible to express that in a natural way.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!