c++construct模板的问题

template
inline void
Construct(_T1* __p, _Args&&... __args)
{ ::new(static_cast(
_p)) T1(std::forward<_Args>(_args)...); }
上面这段是我系统里的stl_construct.h里的construct模板,我用的不是SGI STL所以这段代码没用,但是这段代码是错的吧,可变参数大于2时,会用多个参数构造_T1,我查了一下SGI中的construct模板,没有查到这种可变参数版本的,想问这个模板怎么写才正确

试试这个

 template <class T1 >
inline void
Construct(_T1* __p, _Args&&... __args)
{
    ::new(static_cast(_p)) T1(std::forward<_Args>(_args)...);
}

这是C++11及以后才支持的语法吧?系统头文件里的不会有错,只不过我们一般用不了这么复杂,这么写我猜也能覆盖单参数的情形。