From 1979c02da1684cf4e503e011ca97aa00929f4c0f Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Fri, 11 Apr 2014 10:53:48 -0400
Subject: [PATCH] hashtable: Poison operator= on internal node type

Declare a private _Hashtable_node<_Val>::operator= without
implementation to ensure no code tries to assign nodes.
The hash_map uses "pair<const _Key,_Tp>" as the value type
so the const key cannot be assigned.

Change-Id: If772e1588c9504df450c18eb0d36dc024db9f2da
---
 hashtable.hxx.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hashtable.hxx.in b/hashtable.hxx.in
index 62aa3f3..b93e9be 100644
--- a/hashtable.hxx.in
+++ b/hashtable.hxx.in
@@ -310,6 +310,9 @@ struct _Hashtable_node
 {
   _Hashtable_node* _M_next;
   _Val _M_val;
+  void public_method_to_quiet_warning_about_all_methods_private();
+private:
+  void operator=(_Hashtable_node<_Val> const&); // poison node assignment
 };
 
 template <class _Val, class _Key, class _HashFcn,
-- 
GitLab