Boost C++ Libraries: Ticket #4584: recursive_variant_ fails with VC++ 2010's map https://svn.boost.org/trac10/ticket/4584 <p> Code like this: </p> <p> make_recursive_variant&lt;int, std::map&lt;int, recursive_variant_&gt;&gt;::type </p> <p> Fails on VC++ because the map is instantiated which in turn instantiates std::pair&lt;int, recursive_variant_&gt;. pair does not work with the incomplete type recursive_variant_. </p> <p> Simple workaround is to change variant_fwd.hpp: </p> <p> struct recursive_variant_; </p> <p> to: </p> <p> struct recursive_variant_ {}; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4584 Trac 1.4.3 Cory Nelson <phrosty@…> Sun, 22 Aug 2010 08:32:01 GMT <link>https://svn.boost.org/trac10/ticket/4584#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4584#comment:1</guid> <description> <p> Alright, this bug can be simplified by using std::pair directly instead of std::map. </p> </description> <category>Ticket</category> </item> <item> <author>ilya@…</author> <pubDate>Tue, 14 Dec 2010 09:09:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4584#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4584#comment:2</guid> <description> <p> Confirmed bug on VC++ 2008 SP1. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 03 Jan 2011 04:57:49 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4584#comment:3 https://svn.boost.org/trac10/ticket/4584#comment:3 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/67604" title="Avoid error instantiating map with recursive_variant_. Disable ADL to ...">[67604]</a>) Avoid error instantiating map with recursive_variant_. Disable ADL to make instantiation less likely. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4584" title="#4584: Bugs: recursive_variant_ fails with VC++ 2010's map (closed: fixed)">#4584</a>. </p> Ticket