This is the mail archive of the
mailing list for the GCC project.
Re: Value type of map need not be default copyable
On 08/04/2012 05:27 PM, Marc Glisse wrote:
On Sat, 4 Aug 2012, Paolo Carlini wrote:First, I think we should add libstdc++ in CC.
On 08/04/2012 05:16 PM, Marc Glisse wrote:
The font indicates it is "english" insert, not "function" insert. In
the testcase, value_type is not move constructible, so once you have
an object of type value_type, you can't do anything with it.
On Sat, 4 Aug 2012, Paolo Carlini wrote:Are you really sure that emplace is involved? I'm not. The letter of
the standard uses 'inserts'.
I'm not sure to understand which specific testcase you are
discussing, but for sure we don't want regressions. I agree that we
should assume a priori that the standard is right, but correcting
the make_pair should not lead to failures elsewhere (unless a
proper analysis establishes that the existing testcases are wrong)
Let's say it currently works by accident. What I believe is needed
is to implement the missing emplace function, and then operator
and others can be made to use it.
Thus, I would recommend people working in this area to begin with
unordered_map, because in that case emplace is already available,
assuming that's really the point (and therefore reverting the patch was
a good idea, luckily an existing testcase helped us)
At the same time an implementation of emplace is definitely welcome, in