Boost C++ Libraries: Ticket #10403: fusion make_map metafunction https://svn.boost.org/trac10/ticket/10403 <p> Hello, </p> <p> It seems documentation is out-of-sync with implementation of fusion's make_map metafunction, and also the new implementation (using variadic templates) is inconsistent with previous ones. </p> <p> The docs <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> say: result_of::make_map&lt;int, double, char, double&gt;::type </p> <p> make_map is implemented as a metafunction class, i.e. it does not have a nested type typedef: </p> <blockquote> <p> template &lt;typename ...Key&gt; struct make_map { </p> <blockquote> <p> template &lt;typename ...T&gt; struct apply { </p> <blockquote> <p> typedef map&lt; </p> <blockquote> <p> fusion::pair&lt; </p> <blockquote> <p> Key </p> </blockquote> <p> , typename detail::as_fusion_element&lt;T&gt;::type </p> <blockquote class="citation"> <p> ...&gt; </p> </blockquote> </blockquote> <p> type; </p> </blockquote> <p> }; </p> </blockquote> <p> }; </p> </blockquote> <p> so the proper "call" would be: result_of::make_map&lt;int, double&gt;::apply&lt;char, double&gt;::type </p> <p> From this I conclude it is not only a documentation error, but also api breach. Presumably it got unnoticed since make_map function is not using make_map metafunction anymore (as opposed to what the docs claim <a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a>). </p> <p> regards </p> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> <a href="http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html">http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html</a> <a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a> <a href="http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html">http://www.boost.org/doc/libs/1_56_0/libs/fusion/doc/html/fusion/container/generation/functions/make_map.html</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10403 Trac 1.4.3 Joel de Guzman Tue, 26 Aug 2014 10:41:47 GMT <link>https://svn.boost.org/trac10/ticket/10403#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10403#comment:1</guid> <description> <p> Indeed. Sorry about that. The docs are out of sync in that regard. I'd welcome a documentation patch if you have one. Editing the relevant quickbook file is sufficient. A pull request to <a class="ext-link" href="https://github.com/boostorg/fusion"><span class="icon">​</span>https://github.com/boostorg/fusion</a> would be great! </p> </description> <category>Ticket</category> </item> <item> <author>Wojciech Mamrak <wmamrak@…></author> <pubDate>Tue, 26 Aug 2014 11:07:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10403#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10403#comment:2</guid> <description> <p> Ok. </p> </description> <category>Ticket</category> </item> <item> <author>Kohei Takahashi <flast@…></author> <pubDate>Sun, 30 Nov 2014 06:35:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10403#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10403#comment:3</guid> <description> <p> FYI, the documetation was fixed in 1.57 release. </p> <p> <a href="http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html">http://www.boost.org/doc/libs/1_57_0/libs/fusion/doc/html/fusion/container/generation/metafunctions/make_map.html</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sun, 30 Nov 2014 06:38:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/10403#comment:4 https://svn.boost.org/trac10/ticket/10403#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket