Allow in-place construction of `CDList` items (#6409)
authorAndres Noetzli <andres.noetzli@gmail.com>
Thu, 22 Apr 2021 03:25:57 +0000 (20:25 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Apr 2021 03:25:57 +0000 (03:25 +0000)
commit3527400d2af35d96a47971db83891b31c47f57ef
tree2965a13d498543ff8769a1d916ec839aa916edee
parent89620a0d73e7134437a39d742e91de11a08a4962
Allow in-place construction of `CDList` items (#6409)

This commit adds CDList::emplace_back(), which allows users to create
elements in CDList in-place (as opposed to copying the items using
CDList::push_back(). This allows CDList to be used with
std::unique_ptrs, which do not allow copying. Using
CDList::emplace_back() could also be more efficient in certain cases.
src/context/cdlist.h
test/unit/context/cdlist_black.cpp