Fix UB in uses_alloc_types.hpp

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-06-27 01:52:14 +00:00
parent 83d7ca9ea5
commit 928a58f7d2

View File

@@ -172,12 +172,12 @@ protected:
private:
template <class ...LArgs, class ...Args>
static CtorAlloc const& getAllocatorFromPack(ArgumentListID<LArgs...>, Args&&... args) {
static CtorAlloc getAllocatorFromPack(ArgumentListID<LArgs...>, Args&&... args) {
return getAllocatorFromPackImp<LArgs const&...>(args...);
}
template <class ...LArgs>
static CtorAlloc const& getAllocatorFromPackImp(
static CtorAlloc getAllocatorFromPackImp(
typename detail::Identity<LArgs>::type..., CtorAlloc const& alloc) {
return alloc;
}