title: Forward declaration for recursive data structure
body: <p>Way back when I was writing Delphi, there was a <code>TStringList</code> which was basically a map of strings to Delphi's generic <code>TObject</code>. Using this structure, I could easily make a recursive, hierarchical structure by placing another <code>TStringList</code> against one of the string keys:</p>
  
  <pre><code>ParentStringList["somekey"] = "just a string value";
  ParentStringList["anotherkey"] = SomeChildStringList;
  </code></pre>
  
  <p>Question is, how do I achieve the same thing in C++?</p>
  
  <p>What I have at the moment is:</p>
  
  <pre><code>typedef boost::variant&lt; std::string, my_dictionary &gt; my_variant;
  typedef std::map &lt; std::string, my_variant &gt; my_dictionary;
  </code></pre>
  
  <p>... which is clearly circular.</p>
  
  <p>Can I do this without wrapping things in structs (which I can forward declare), or without using pointers (which the compiler knows the size of)?</p>