* Re: unordered associative containers are non-copyable in profile mode
[not found] ` <CAH6eHdQG6SZamkd-opHDxi8XAwLsfz1evw4N5TYwJwPNhwQO4g@mail.gmail.com>
@ 2011-11-09 8:37 ` Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2011-11-09 8:37 UTC (permalink / raw)
To: libstdc++; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
On 9 November 2011 01:05, Jonathan Wakely wrote:
> On 9 November 2011 00:56, Paolo Carlini wrote:
>> On 11/09/2011 12:51 AM, Jonathan Wakely wrote:
>>>
>>> The obvious fix is simply to change the argument type, but is there a
>>> reason it's defined that way?
>>
>> Is there any reason for not having, for the time being at least, the same
>> set of constructors we have in debug-mode, thus add a proper
>> copy-constructor too?
>
> Ah, I didn't notice that's what the debug mode ones have. I think
> that makes sense.
Fixed like so:
* include/profile/unordered_map: Add missing copy constructors.
* include/profile/unordered_set: Likewise.
Tested x86_64-linux, committed to trunk
[-- Attachment #2: unord.patch --]
[-- Type: text/x-patch, Size: 1882 bytes --]
Index: include/profile/unordered_map
===================================================================
--- include/profile/unordered_map (revision 181195)
+++ include/profile/unordered_map (revision 181196)
@@ -96,6 +96,13 @@ namespace __profile
__profcxx_hashtable_construct2(this);
}
+ unordered_map(const unordered_map& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
unordered_map(const _Base& __x)
: _Base(__x)
{
@@ -365,6 +372,12 @@ namespace __profile
__profcxx_hashtable_construct(this, _Base::bucket_count());
}
+ unordered_multimap(const unordered_multimap& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
unordered_multimap(const _Base& __x)
: _Base(__x)
{
Index: include/profile/unordered_set
===================================================================
--- include/profile/unordered_set (revision 181195)
+++ include/profile/unordered_set (revision 181196)
@@ -95,6 +95,13 @@ namespace __profile
__profcxx_hashtable_construct2(this);
}
+ unordered_set(const unordered_set& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ __profcxx_hashtable_construct2(this);
+ }
+
unordered_set(const _Base& __x)
: _Base(__x)
{
@@ -339,6 +346,12 @@ namespace __profile
__profcxx_hashtable_construct(this, _Base::bucket_count());
}
+ unordered_multiset(const unordered_multiset& __x)
+ : _Base(__x)
+ {
+ __profcxx_hashtable_construct(this, _Base::bucket_count());
+ }
+
unordered_multiset(const _Base& __x)
: _Base(__x)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-09 8:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAH6eHdSeDgs4zaN5Ax46vkxATP5861sOgEMO0yx6TjZRx+J3jg@mail.gmail.com>
[not found] ` <4EB9CFA5.2020908@oracle.com>
[not found] ` <CAH6eHdQG6SZamkd-opHDxi8XAwLsfz1evw4N5TYwJwPNhwQO4g@mail.gmail.com>
2011-11-09 8:37 ` unordered associative containers are non-copyable in profile mode Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).