diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -81,33 +81,11 @@ void operator()(locale::facet* p) {p->__release_shared();} }; -template -inline -T& -make(A0 a0) -{ - 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) +template +T& make(Args ...args) { static typename aligned_storage::type buf; - auto *obj = ::new (&buf) T(a0, a1, a2); + auto *obj = ::new (&buf) T(args...); return *obj; }