]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add ceph::allocate_unique()
authorCasey Bodley <cbodley@redhat.com>
Fri, 3 Apr 2020 14:41:10 +0000 (10:41 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 9 Sep 2020 02:09:40 +0000 (22:09 -0400)
commit3e5ecffceb2d0614ded5ad3d329bb14c33b853b3
tree1031eaea5b2fcafdba8435fd6c1e6d7b554eea9a
parentfba1845211064a9b6121127b636d38fb50924853
common: add ceph::allocate_unique()

adds an allocator-aware version of std::make_unique(). this is similar to
std::allocate_shared(), though it's slightly less convenient because,
unlike std::shared_ptr<T>, the Deleter has to be specified as a template
parameter in std::unique_ptr<T, Deleter>

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/allocate_unique.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_allocate_unique.cc [new file with mode: 0644]