title: How to use boost::range::adaptors::transformed over std::unordered_set?
body: <p>I'm trying to use boost::adaptors::transformed over a std::unordered_set but seems to produce weird behaviors even on quite small experiments.</p>
  
  <p>I'm using Boost 1.58.0 on Ubuntu 16.04 with gcc 5.4.0.</p>
  
  <p>Added elements after range initialization are not listed while iterating the range:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;unordered_set&gt;
  #include &lt;boost/range/adaptor/transformed.hpp&gt;
  
  struct double_int
  {
      typedef int result_type;
      int operator()(int x) const { return x * 2; }
  };
  
  int main()
  {
    std::unordered_set&lt;int&gt; set;
  
    for(int i = 0; i &lt; 5; ++i)
      set.insert(i); //adding ints to set
  
    auto range = set | boost::adaptors::transformed(double_int());
  
    set.insert(10); //adding some other int
  
    //this produces: '8 0 2 4 6'
    for(auto i : range)
      std::cout &lt;&lt; i &lt;&lt; std::endl;
  
    //this produces: '10 4 0 1 2 3'
    for(auto i : set)
      std::cout &lt;&lt; i &lt;&lt; std::endl;
  
    //element 10 is not doubled!
  
    return 0;
  }
  </code></pre>
  
  <p>Following the same scheme with other std containers (like std::list) work as intended, doubling the latter added elements.</p>
  
  <p>Even more weirdly if the set is initialized using: </p>
  
  <pre><code>std::unordered_set&lt;int&gt; set = {0,1,2,3,4,5};
  </code></pre>
  
  <p>range iteration gives only '10' while container's '10 0 1 2 3 4 5'</p>
  
  <p>Could someone tell me what is wrong with this example?</p>