title: error: no matching function for call to 'std::reference_wrapper<Medium>::reference_wrapper()
body: <p><code>Book</code> and <code>Article</code> are derived classes from <code>Medium</code>.</p>
  
  <p>Why am I getting this error when trying to insert <code>Medium</code> / <code>Book</code> / <code>Article</code> in the bibliography?</p>
  
  <pre><code>error: no matching function for call to '**std::reference_wrapper&lt;Medium&gt;::reference_wrapper()**
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HGSK4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HGSK4.png" alt="Compiler error"></a></p>
  
  <p><strong>main.cc</strong></p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  #include "Bibliography.h"
  #include "Medium.h"
  #include "Book.h"
  #include "Article.h"
  
  int main()
  {
      Bibliography p(1);
      Medium m1("PN","I","Pasol nah",2017);
      p.insert(m1);
      cout &lt;&lt; p;
      return 0;
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Bibliography.h</strong></p>
  
  <pre><code>#ifndef BIBLIOGRAPHY_H_
  #define BIBLIOGRAPHY_H_
  
  #include "Medium.h"
  #include "Article.h"
  #include "Book.h"
  #include &lt;iostream&gt;
  #include &lt;functional&gt;
  #include &lt;vector&gt;
  
  class Bibliography
  {
    private:
      int m_Size;
      std::vector&lt;std::reference_wrapper&lt;Medium&gt;&gt; v;
      int index;
    public:
      Bibliography(int size);
      void insert(Medium m);
      friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, const Bibliography &amp;b1);
  };
  
  #endif
  </code></pre>
  
  <hr>
  
  <p><strong>Bibliography.cc</strong></p>
  
  <pre><code>#include "Bibliography.h"
  
  Bibliography::Bibliography(int size)
  {
      std::cout &lt;&lt; "Bibliography created \n";
      m_Size = size;
      v.resize(m_Size);
      index = 0;
  }
  
  void Bibliography::insert(Medium m)
  {
      v.push_back(m);
  }
  
  std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, const Bibliography &amp;b1)
  {
      for (Medium &amp;Medium : b1.v)
      {
          out &lt;&lt; Medium.toString() &lt;&lt; std::endl;
      }
      return out;
  }
  </code></pre>