[Bug libstdc++/63274] std::list uses T(...) instead of T{...} in implementation of emplace()

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 16 08:22:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63274

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to __vic from comment #0)
> I suppose it should work without defining constructor for C.

No, not according to the standard.

std::allocator is required to use parentheses for initialization, see 20.7.9.1
[allocator.members] paragraph 12.

http://cplusplus.github.io/LWG/lwg-active.html#2089 suggests changing that.



More information about the Gcc-bugs mailing list