diff mbox

unordered associative containers are non-copyable in profile mode

Message ID CAH6eHdToiLOu+FNUb+=00hu+ayyfQLkzDrBRmnxbCTxutfmYyA@mail.gmail.com
State New
Headers show

Commit Message

Jonathan Wakely Nov. 9, 2011, 8:26 a.m. UTC
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
diff mbox

Patch

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)
       {