Boost C++ Libraries: Ticket #4108: C2139 error in VS2010 https://svn.boost.org/trac10/ticket/4108 <p> VC2008 can compile this code, but VS2010 can't. Error log attached. </p> <pre class="wiki">#include &lt;boost/variant.hpp&gt; #include &lt;boost/shared_ptr.hpp&gt; struct NonTerminal; struct Terminal; typedef boost::variant &lt; boost::recursive_wrapper&lt;NonTerminal&gt;, Terminal &gt; AST; struct NonTerminal { public: NonTerminal(boost::shared_ptr&lt;AST&gt; a): m(a) { } boost::shared_ptr&lt;AST&gt; m; }; struct Terminal { }; void main() { } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4108 Trac 1.4.3 ka3a4ok@… Sat, 17 Apr 2010 16:21:03 GMT attachment set https://svn.boost.org/trac10/ticket/4108 https://svn.boost.org/trac10/ticket/4108 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">errors.txt</span> </li> </ul> <p> Error log from compiler </p> Ticket Steven Watanabe Sat, 17 Apr 2010 17:47:18 GMT component changed; owner set https://svn.boost.org/trac10/ticket/4108#comment:1 https://svn.boost.org/trac10/ticket/4108#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Peter Dimov</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">smart_ptr</span> </li> </ul> <p> This is caused by some unintended ADL in shared_ptr. </p> Ticket Steven Watanabe Sat, 17 Apr 2010 20:13:29 GMT <link>https://svn.boost.org/trac10/ticket/4108#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4108#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/61344" title="Work around over-eager ADL with msvc-10.0. Refs #4108">[61344]</a>) Work around over-eager ADL with msvc-10.0. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4108" title="#4108: Bugs: C2139 error in VS2010 (closed: fixed)">#4108</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 26 May 2010 17:34:03 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4108#comment:3 https://svn.boost.org/trac10/ticket/4108#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/62244" title="Merge [61344] to release. Fixes #4108.">[62244]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/61344" title="Work around over-eager ADL with msvc-10.0. Refs #4108">[61344]</a> to release. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4108" title="#4108: Bugs: C2139 error in VS2010 (closed: fixed)">#4108</a>. </p> Ticket