std::initializer_list fix

729 views
Skip to first unread message

gogu

unread,
Feb 27, 2019, 11:12:21 AM2/27/19
to ISO C++ Standard - Future Proposals
Remove the constness of the underlying array used by a std::initializer_list so that elements can be moved from it.

Nicolas Lesser

unread,
Feb 27, 2019, 12:20:14 PM2/27/19
to std-pr...@isocpp.org
It's not that easy unfortunately. This has been already proposed, so you might want to look up any previous discussion.

The biggest against: It breaks ABI.

On Wed, Feb 27, 2019, 5:12 PM gogu <valeriu...@my.fmi.unibuc.ro> wrote:
Remove the constness of the underlying array used by a std::initializer_list so that elements can be moved from it.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/70a5d46b-8046-4588-a6aa-7dc4308d13bf%40isocpp.org.

Brian Bi

unread,
Feb 27, 2019, 12:31:32 PM2/27/19
to std-pr...@isocpp.org
P0065 seems to be the most currently relevant "movable initializer list" proposal. Its author says that the reason why we still don't have movable initializer lists it that "the committee denies that the problem is significant." (source). This doesn't mean we should give up, but it does suggest that we might want to focus effort on showing why this would be useful rather than just coming up with more proposals.





--
Brian Bi
Reply all
Reply to author
Forward
0 new messages