title: Functor reference through a std::function
body: <p>Basically, I would like to have the following semantic :</p>
  
  <pre><code>#include &lt;functional&gt;
  #include &lt;iostream&gt;
  
  class test
  {
    public:
      void add(std::function&lt;void()&gt; f)
      {
        f();
      }
  
      void operator()()
      {
        ++x;
      }
  
      int x = 33;
  };
  
  int main()
  {
    test t;
    t.add(t);
    // wanted: x == 34 instead: x == 33 since add(t) copies it
  }
  </code></pre>
  
  <p>I understand std::function wraps a copy of the callable object but is there any way to get a reference to a callable object using std::function?</p>