mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-09 10:55:03 +00:00
[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
This commit is contained in:
parent
5420fc4a27
commit
706bd129b3
@ -81,33 +81,11 @@ struct release
|
||||
void operator()(locale::facet* p) {p->__release_shared();}
|
||||
};
|
||||
|
||||
template <class T, class A0>
|
||||
inline
|
||||
T&
|
||||
make(A0 a0)
|
||||
template <class T, class ...Args>
|
||||
T& make(Args ...args)
|
||||
{
|
||||
static typename aligned_storage<sizeof(T)>::type buf;
|
||||
auto *obj = ::new (&buf) T(a0);
|
||||
return *obj;
|
||||
}
|
||||
|
||||
template <class T, class A0, class A1>
|
||||
inline
|
||||
T&
|
||||
make(A0 a0, A1 a1)
|
||||
{
|
||||
static typename aligned_storage<sizeof(T)>::type buf;
|
||||
::new (&buf) T(a0, a1);
|
||||
return *reinterpret_cast<T*>(&buf);
|
||||
}
|
||||
|
||||
template <class T, class A0, class A1, class A2>
|
||||
inline
|
||||
T&
|
||||
make(A0 a0, A1 a1, A2 a2)
|
||||
{
|
||||
static typename aligned_storage<sizeof(T)>::type buf;
|
||||
auto *obj = ::new (&buf) T(a0, a1, a2);
|
||||
auto *obj = ::new (&buf) T(args...);
|
||||
return *obj;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user