diff options
Diffstat (limited to 'ml/dlib/dlib/smart_pointers/scoped_ptr.h')
-rw-r--r-- | ml/dlib/dlib/smart_pointers/scoped_ptr.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ml/dlib/dlib/smart_pointers/scoped_ptr.h b/ml/dlib/dlib/smart_pointers/scoped_ptr.h new file mode 100644 index 000000000..dd890f330 --- /dev/null +++ b/ml/dlib/dlib/smart_pointers/scoped_ptr.h @@ -0,0 +1,16 @@ +#ifndef DLIB_SCOPED_PTr_H_ +#define DLIB_SCOPED_PTr_H_ + +#include <memory> + +namespace dlib { + // Template alias for compatibility with clients using old dlib::scoped_ptr + // Old scoped_ptr implementation is removed completely + // This alias may fail in some reference deduction cases + + template <class T, class Deleter = std::default_delete<T> > + using scoped_ptr = std::unique_ptr<T, Deleter>; + +} + +#endif |