Monthly Archives: August 2012

std::unique_ptr for Windows handles

To close a Windows handle with std::unique_ptr, we need to define a type with operator() and specify it as the second template parameter. This is different from std::shared_ptr where we can just specify the functor in a constructor parameter. Although … Continue reading

Posted in C++ | Tagged , | 4 Comments