[Bug c++/51138] [C++0x] [4.6 Regression] Uninitialized list elements
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 15 10:49:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51138
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-15
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-15 10:08:44 UTC ---
Confirmed.
With -std=c++0x the constructor calls this with an empty parameter pack:
template<typename... _Args>
void
emplace_back(_Args&&... __args)
{ this->_M_insert(end(), std::forward<_Args>(__args)...); }
which calls allocator::construct with an empty pack:
_M_get_Node_allocator().construct(__p,
std::forward<_Args>(__args)...);
which does
template<typename... _Args>
void
construct(pointer __p, _Args&&... __args)
{ ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
More information about the Gcc-bugs
mailing list