title: Problem with boost::bind, boost::function and boost::factory
body: <p>I'm trying without success to use a boost::bind with a boost::factory</p>
  
  <p>I have this class Zambas with 4 arguments (2 strings and 2 ints) and</p>
  
  <pre><code>class Zambas {
  
  public:
  
  Zambas(const std::string&amp;, const std::string&amp;,int z1=0,int z2=0) {    
        if (z1==z2){
  
        }
      }
  };
  </code></pre>
  
  <p>inside other method i have the following call</p>
  
  <pre><code>boost::function&lt;Zambas*()&gt; f(boost::bind(boost::factory&lt;Zambas*&gt;(), std::string(""), std::string(""),_1,_2));
  </code></pre>
  
  <p>that fails with the following compiler error: </p>
  
  <p><code>bind.hpp:382: error: no match for ‘operator[]’ in ‘a[boost::_bi::storage3&lt;A1, A2, boost::arg&lt;I&gt; &gt;::a3_ [with A1 = boost::_bi::value&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, A2 = boost::_bi::value&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, int I = 1]]’</code></p>
  
  <p>What I'm doing wrong ?</p>