This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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:

On 08/04/2012 05:16 PM, Marc Glisse wrote:
On Sat, 4 Aug 2012, Paolo Carlini wrote:

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.
Are you really sure that emplace is involved? I'm not. The letter of the standard uses 'inserts'.
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.
First, I think we should add libstdc++ in CC.

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 any case.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]