Boost C++ Libraries: Ticket #6155: VS2010 compile error in lambda, if posix_time.hpp is included. https://svn.boost.org/trac10/ticket/6155 <p> boost 1.46.1 compiles ok.<br /> boost 1.48 gives:<br /> "error C2663: 'std::vector&lt;_Ty&gt;::at' : 2 overloads have no legal conversion for 'this' pointer" </p> <p> See annotations in attached testcase. </p> <p> Compiler error? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6155 Trac 1.4.3 anonymous Sun, 20 Nov 2011 13:13:51 GMT attachment set https://svn.boost.org/trac10/ticket/6155 https://svn.boost.org/trac10/ticket/6155 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_148_test.zip</span> </li> </ul> Ticket anonymous Sun, 20 Nov 2011 13:16:44 GMT <link>https://svn.boost.org/trac10/ticket/6155#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6155#comment:1</guid> <description> <pre class="wiki">#include "stdafx.h" #include &lt;boost/date_time/posix_time/posix_time.hpp&gt; #include &lt;vector&gt; #include &lt;memory&gt; class A {}; class B: public std::vector&lt;std::shared_ptr&lt;A&gt;&gt; { public: void f() { unsigned u_(0); auto lambda_([&amp;]() { at(u_); // boost1.48: error C2663: 'std::vector&lt;_Ty&gt;::at' : 2 overloads have no legal conversion for 'this' pointer // boost1.46.1: ok this-&gt;at(u_); // ok }); } }; </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 20 Nov 2011 13:35:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6155#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6155#comment:2</guid> <description> <p> Simplified testcase,<br /> regression also shows without shared_ptr&lt;&gt;: </p> <pre class="wiki">#include &lt;boost/date_time/posix_time/posix_time.hpp&gt; class A {}; class B: public std::vector&lt;A&gt; { public: void f() { unsigned u_(0); auto lambda_([&amp;]() { at(u_); // boost1.48: error C2663: 'std::vector&lt;_Ty&gt;::at' : 2 overloads have no legal conversion for 'this' pointer // boost1.46.1: ok this-&gt;at(u_); // ok }); } }; </pre> </description> <category>Ticket</category> </item> </channel> </rss>