title: Iterating through a deque and push value into a new container
body: <p>I am iterating through a couple of deques, combining the data into a new container and then using the data later. The problem is that any reference to my iterator value is causing a segmentation fault at some point during the execution of the code. From everything I can find says this should be valid because I don't <strong>think</strong> I am invalidating the iterator in any way. </p>
  
  <pre><code>vector&lt;char&gt; fileData;
  deque&lt;deque &lt;char&gt; &gt;::iterator channel;
  deque&lt;char&gt;::iterator channelData;
  
  for(channel=instance.mdata.begin(); channel!=instance.mdata.end(); ++channel)
  {
      for(channelData=deque&lt;char&gt;(*channel).begin(); channelData!=deque&lt;char&gt;(*channel).end(); ++channelData)
      {
          fileData.push_back(*channelData);
      }
  }
  </code></pre>