title: Confusion between boost::bind and boost::phoenix placeholders
body: <p>The <code>boost::spirit</code> documentation has this important warning</p>
  
  <blockquote>
    <p>There are different ways to write semantic actions for Spirit.Qi: using
    plain functions, <code>Boost.Bind</code>, <code>Boost.Lambda</code>, or <code>Phoenix</code>. The latter
    three allow you to use special placeholders to control parameter
    placement (<code>_1</code>, <code>_2</code>, etc.). Each of those libraries has it's own
    implementation of the placeholders, all in different namespaces. You have
    to make sure not to mix placeholders with a library they don't belong to
    and not to use different libraries while writing a semantic action.</p>
    
    <p>Generally, for <code>Boost.Bind</code>, use <code>::_1</code>, <code>::_2</code>, etc. (yes, these placeholders are
    defined in the global namespace).</p>
    
    <p>For <code>Boost.Lambda</code> use the placeholders defined in the namespace <code>boost::lambda</code>.</p>
    
    <p>For semantic actions written using Phoenix use the placeholders defined in
    the namespace <code>boost::spirit</code>. Please note that all existing placeholders for
    your convenience are also available from the namespace <code>boost::spirit::qi</code></p>
  </blockquote>
  
  <p>(<a href="http://www.boost.org/doc/libs/1_46_0/libs/spirit/doc/html/spirit/qi/tutorials/semantic_actions.html" rel="nofollow">documentation</a>)</p>
  
  <p>OK, so I write this code</p>
  
  <pre><code>template &lt;typename Iterator&gt;
  struct ruleset_grammar : qi::grammar&lt;Iterator&gt;
  {
      template &lt;typename TokenDef&gt;
      ruleset_grammar(TokenDef const&amp; tok)
        : ruleset_grammar::base_type(start)
      {
  
          start =  *(  tok.set_name [ boost::bind( &amp;cRuleSet::setName, &amp;theRuleSet, ::_1 ) ]
                    )
                ;
      }
  
      qi::rule&lt;Iterator&gt; start;
  };
  </code></pre>
  
  <p>Please note the use of <code>::_1</code></p>
  
  <p>However, I still get this compiler error</p>
  
  <pre><code>c:\documents and settings\james\spirit_test.cpp(138) : error C2872: '_1' : ambiguous symbol
          could be 'c:\program files\boost\boost_1_44\boost\spirit\home\support\argument.hpp(124) : const boost::phoenix::actor&lt;Eval&gt; boost::spirit::_1'
          with
          [
              Eval=boost::spirit::argument&lt;0&gt;
          ]
          or       'c:\program files\boost\boost_1_44\boost\bind\placeholders.hpp(43) : boost::arg&lt;I&gt; `anonymous-namespace'::_1'
          with
          [
              I=1
          ]
  </code></pre>
  
  <p>How do I fix this compiler error?</p>