Is const_cast(iterator->second) safe?
<p>I want to know if this code is safe and doesnt have any undefined behavior.</p>

<pre><code> QueueMap::const_iterator it = m_3playersQueue.find(s-&gt;m_GameCode);
 if(it == m_3playersQueue.end())
 {
     std::deque&lt;Session*&gt; stack;
     stack.push_back(s);

     m_3playersQueue[s-&gt;m_GameCode] = stack;
     return;
 }

 const_cast&lt;std::deque&lt;Session*&gt;&amp;&gt;(it-&gt;second).push_back(s);

 QueueMap is of type std::tr1::unordered_map&lt; uint32, std::deque&lt;Session*&gt; &gt;
</code></pre>

<p>Thanks</p>
