title: Compiler warning for multiple copy constructors
body: <p>I want to use a custom class as the type for a boost::heap::fibonacci_heap and also be able to iterate and modify the elements of the heap. I'm experimenting with the code provided by <a href="https://stackoverflow.com/questions/15102406/how-to-orderly-traverse-a-boost-heap-priority-queue-and-update-a-given-element/15104309#15104309">How to orderly traverse a Boost.Heap Priority Queue and update a given element?</a> . </p>
  
  <p>I've come up with a working example, but my Visual Studio 2010 compilier warns me that my class EdgeHeap has multiple copy constructors ( <a href="http://msdn.microsoft.com/en-us/library/e02fwk4s.aspx" rel="nofollow noreferrer">warning documentation</a> ). </p>
  
  <p>Here's the warning (roughly):</p>
  
  <pre><code>filepath\boost\heap\fibonacci_heap.hpp(762): warning C4521: 'boost::heap::fibonacci_heap&lt;T&gt;': Multiple constructors
            with
            [
                T=EdgeHeap
            ]
  </code></pre>
  
  <p>I'm confused because I haven't declared any copy constructors, so the only ones should be those automatically added by the compiler. Where are the multiple constructors coming from? Also is this something that I should worry about?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  #include &lt;boost/heap/fibonacci_heap.hpp&gt;
  
  class Edge
  {
      public:
          int index;
          double weight;
          std::pair&lt;int, int&gt; vertices;
  
          Edge(int i, double w, int start, int end)
          {
              index = i;
              weight = w;
              vertices.first = start;
              vertices.second = end;
          }
  };
  
  class EdgeHeap
  {
      typedef boost::heap::fibonacci_heap&lt;EdgeHeap&gt;::handle_type handle_t;
  
      public:
          handle_t handle;
          Edge data;
  
          EdgeHeap(const Edge &amp;data_) : data(data_) {}
  
          bool operator&lt;(EdgeHeap const &amp; rhs) const
          {
              return data.weight &lt; rhs.data.weight;
          }
  };
  
  void setup_handle(boost::heap::fibonacci_heap&lt;EdgeHeap&gt;::handle_type &amp;&amp;handle)
  {
      (*handle).handle = handle;
  }
  
  int main()
  {
      boost::heap::fibonacci_heap&lt;EdgeHeap&gt; heap;
  
      Edge e(0, 10, 0, 1);
      setup_handle(heap.push(e));
      Edge e1(1, 2, 1, 2);
      setup_handle(heap.push(e1));
      Edge e2(2, 80, 2, 0);
      setup_handle(heap.push(e2));
  
      std::find_if(heap.ordered_begin(), heap.ordered_end(),
      [&amp;heap](const EdgeHeap &amp;e) -&gt; bool
      {
          if(e.data.index == 2)
          {
              const_cast&lt;EdgeHeap &amp;&gt;(e).data.weight += 2;
              heap.increase(e.handle);
              return true;
          }
          return false;
      });
  
      std::for_each(heap.ordered_begin(), heap.ordered_end(),
      [](const EdgeHeap &amp;e)
      {
          std::cout &lt;&lt; e.data.weight &lt;&lt; std::endl;
      });
  }
  </code></pre>