title: Am I Allowed to Default a Template Argument in a Forward Declaration
body: <p>So I'm trying to understand what's happening with Boost's <code>ptree</code> implementation. </p>
  
  <p>In ptree.hpp <code>basic_ptree</code> is actually defined:</p>
  
  <pre><code>template&lt;class Key, class Data, class KeyCompare&gt;
  class basic_ptree
  </code></pre>
  
  <p>In ptree_fwd.hpp there is what looks like a forward declaration of <code>basic_ptree</code> but with a new template argument default:</p>
  
  <pre><code>template &lt; class Key, class Data, class KeyCompare = std::less&lt;Key&gt; &gt;
  class basic_ptree;
  </code></pre>
  
  <p>And finally in ptree_fwd.hpp <code>ptree</code> is <code>typedef</code>'d:</p>
  
  <pre><code>typedef basic_ptree&lt;std::string, std::string&gt; ptree;
  </code></pre>
  
  <p>This is a forward declaration then in ptree_fwd.hpp, right? So I am allowed to default a template argument in a forward declaration?</p>