title: initialize submaps in std::map<..., boost::any>
body: <p>When initializing a <code>std::map&lt;std::string, boost::any&gt;</code>, the value <code>boost::any</code> can indeed take values of any type, including <code>std::map</code>s. However they need to be explicitly defined first, e.g.,</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;map&gt;
  #include &lt;boost/any.hpp&gt;
  int main() {
    std::map&lt;std::string, boost::any&gt; a = {{"y", 2}};
  
    std::map&lt;std::string, boost::any&gt; any = {
      {"hh", 4},
      {"g", a}  // alright
    };
  }
  </code></pre>
  
  <p>Trying the same thing implicitly, e.g.,</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;map&gt;
  #include &lt;boost/any.hpp&gt;
  int main() {
    std::map&lt;std::string, boost::any&gt; any = {
      {"hh", 4},
      {"g", {{"y", 2}}}  // mööp
    };
  }
  </code></pre>
  
  <p>results in the compile error</p>
  
  <pre><code>error: could not convert ‘{{"hh", 4}, {"g", {{"y", 2}}}}’ from ‘&lt;brace-enclosed initializer list&gt;’ to ‘std::map&lt;std::__cxx11::basic_string&lt;char&gt;, boost::any&gt;’
  </code></pre>
  
  <p>What's going wrong? Is there a way to fit the initialization into one statement?</p>