]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: add alloc_ptr smart pointer
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 27 Jul 2017 19:10:14 +0000 (12:10 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 14 Sep 2017 03:22:05 +0000 (20:22 -0700)
commit1bf3b1939ccdf30c4645009887c93fcb03d029e8
tree466c46c8f3e7e48fbdded173135ba00ebaec9221
parent44e206f351297fc9092577a9280fabdadd993cc6
common: add alloc_ptr smart pointer

This ptr is like a unique_ptr except it allocates the underlying object on
access. The idea being that we can save memory if the object is only needed
sometimes.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 5fa557d2713558038af7579de8a3ca56d58b8d90)
src/include/alloc_ptr.h [new file with mode: 0644]