From 706bd129b35c012860fd381482cfbc066e02639a Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 9 Aug 2021 13:26:04 -0400 Subject: [PATCH] [libc++][NFC] Remove workaround for variadic templates in C++03 That's not necessary anymore, since we always build the dylib with C++11 capabilities nowadays. Differential Revision: https://reviews.llvm.org/D107772 --- libcxx/src/locale.cpp | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index d5ab8fb3b836..e590d5d99d3a 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -81,33 +81,11 @@ struct release void operator()(locale::facet* p) {p->__release_shared();} }; -template -inline -T& -make(A0 a0) +template +T& make(Args ...args) { static typename aligned_storage::type buf; - auto *obj = ::new (&buf) T(a0); - return *obj; -} - -template -inline -T& -make(A0 a0, A1 a1) -{ - static typename aligned_storage::type buf; - ::new (&buf) T(a0, a1); - return *reinterpret_cast(&buf); -} - -template -inline -T& -make(A0 a0, A1 a1, A2 a2) -{ - static typename aligned_storage::type buf; - auto *obj = ::new (&buf) T(a0, a1, a2); + auto *obj = ::new (&buf) T(args...); return *obj; }