11.07.2015 Views

Understanding C++ Expression Templates - Angelika Langer

Understanding C++ Expression Templates - Angelika Langer

Understanding C++ Expression Templates - Angelika Langer

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.

47Alexandrescu’s Smart Pointer! the configurable smart pointer class templatefrom the Loki library– uses not just template type parameters, but also template templateparameterstemplateclass SmartPointer;© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(94)last update: 11/7/2005 ,21:37Alexandrescu’s Smart Pointer! ownership policy– deep copy, destructive copy, no copy– reference counted (thread-safe or not)! conversion policy– allow or disallow implicit conversion to underlying pointer type! checking policy– reject null– no check! storage policy– default storage (does delete )– array storage (does array delete[] )– heap storage (calls free())© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(95)last update: 11/7/2005 ,21:37

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

Saved successfully!

Ooh no, something went wrong!