title: Class/struct definition error
body: <p>I am porting/updating some really old code and my C++ is not very sharp (I'm mostly a C programmer).  I received this error - how do I fix it and can someone explain this mess?  Note line 512 is the struct definition - the first line?</p>
  
  <pre><code>In file included from src/aaa_dict_mngr.cxx:38:0:
  ./include/aaa_parser_avpvalue.h:512:41: error: expected template-name before '&lt;' token
  ./include/aaa_parser_avpvalue.h:512:41: error: expected '{' before '&lt;' token
  ./include/aaa_parser_avpvalue.h:512:41: error: expected unqualified-id before '&lt;' token
  </code></pre>
  
  <p>Offending code:</p>
  
  <pre><code>struct DiamidentGrammar : public grammar&lt;DiamidentGrammar&gt;
  {
    template &lt;typename ScannerT&gt;
    struct definition
    {
      definition(DiamidentGrammar const&amp; self)  
      { 
        diameterIdentity = realm;
        realm = label &gt;&gt; *('.' &gt;&gt; label);  // No recursive rule allowed.
        label = diameterName | diameterDname;
        diameterName = alpha_p &gt;&gt; *(alnum_p | '-');
        diameterDname = digit_p &gt;&gt; +(alnum_p | '-');
      }
      rule&lt;ScannerT&gt; diameterIdentity, realm, label, diameterName, diameterDname;
      rule&lt;ScannerT&gt; const&amp; start() const { return diameterIdentity; }
    };
  };
  </code></pre>