title: Implicit cast doesn't work for BOOST_STRONG_TYPEDEF and BOOST_SPIRIT_DEBUG_NODE
body: <p>I have defined a boost::spirit::qi rule:</p>
  
  <pre><code>boost::spirit::qi::rule&lt;Iterator, Identifier()&gt; id;
  </code></pre>
  
  <p>where Identifier is defined by:</p>
  
  <pre><code>BOOST_STRONG_TYPEDEF(std::string, Identifier)
  </code></pre>
  
  <p>but when I use</p>
  
  <pre><code>BOOST_SPIRIT_DEBUG_NODE(id);
  </code></pre>
  
  <p>It fails to compile with following error:</p>
  
  <pre><code>boost_1_51_0/boost/spirit/home/support/attributes.hpp:1203: error: no match for 'operator&lt;&lt;' in 'out &lt;&lt; val'
  </code></pre>
  
  <p>and it lists the overloaded operators of ostream.</p>
  
  <p>Knowing that BOOST_STRONG_TYPEDEF defines a cast operator to the original type, shouldn't
  compiler implicitly cast from Identifier to std::string when using <code>operator&lt;&lt;</code>? or is there a restriction that prevents compiler to apply a cast operator of a type when it is trying to match the other operator (namely <code>operator&lt;&lt;</code> )?</p>
  
  <p>When I define the following operator it compiles:</p>
  
  <pre><code>inline std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, const Identifier&amp; id)
  {
      return os &lt;&lt; static_cast&lt;std::string const&amp;&gt;(id);
  }
  </code></pre>
  
  <p>I am using gcc4.4.2</p>