|
GTPin
|
A smart pointer that provides some of the std::unique_ptr functionality for clients that cannot use C++11 STL. More...
#include <gt_basic_defs.h>
Public Member Functions | |
| UniquePtr () noexcept | |
| Construct UniquePtr(nullptr) | |
| UniquePtr (pointer ptr) noexcept | |
| Construct UniquePtr that owns 'ptr'. | |
| template<typename U > | |
| UniquePtr (UniquePtr< U, D > &&up) noexcept | |
| Construct UniquePtr by moving 'up' to *this. | |
| template<typename U > | |
| UniquePtr & | operator= (UniquePtr< U, D > &&rh) noexcept |
| Move assignment. | |
| ~UniquePtr () noexcept | |
| Destructor. | |
| pointer | Get () const noexcept |
| Return pointer to the owned object. | |
| pointer | operator-> () const noexcept |
| Return pointer to the owned object. | |
| reference | operator* () const |
| Return reference to the owned object. | |
| operator bool () const noexcept | |
| Return true if *this owns an object, false otherwise. | |
| void | Swap (UniquePtr &rh) noexcept |
| Swap the managed objects. | |
| pointer | Release () noexcept |
| Release the ownership of the managed object if any. The caller is responsible for deleting the object. | |
| void | Reset (pointer ptr=nullptr) noexcept |
| Delete the managed object and replace it with the specified one. | |
A smart pointer that provides some of the std::unique_ptr functionality for clients that cannot use C++11 STL.
| T | Type of the object managed by UniquePtr |
| D | Type of the deleter - function object that implements operator()(T*) const. For the sake of simplicity, this type is assumed to be empty (std::is_empty) - a type with no non-static data members |
| pointer gtpin::UniquePtr< T, D >::Release | ( | ) | [inline] |
Release the ownership of the managed object if any. The caller is responsible for deleting the object.
Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT
1.7.4