Search

compile error C2663 in lambda, if boost 1.48 posix_time.hpp is included. by fzuuzf

Closed
as Fixed Help for as Fixed

2
0
Sign in
to vote
Type: Bug
ID: 706537
Opened: 11/20/2011 6:00:22 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
This c++ code snippet compiles using boost 1.46.1 and doesn't compile using boost 1.48:

----------------------------------------------------------------------
#include <boost/date_time/posix_time/posix_time.hpp>


class A {};

class B: public std::vector<A> {
public:

    void f() {
        unsigned u_(0);

        auto lambda_([&]() {
            at(u_);    // boost1.48: error C2663: 'std::vector<_Ty>::at' : 2 overloads have no legal conversion for 'this' pointer
                    // boost1.46.1: ok
            this->at(u_);        // ok
        });
    }
};
---------------------------------------------------------------------------------------
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010 SP1

Steps to reproduce

compile code snippet given above.

Product Language

English

Operating System

Windows 7

Operating System Language

German

Actual results

error C2663: 'std::vector<_Ty>::at' : 2 overloads have no legal conversion for 'this' pointer

Expected results

no error
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/25/2012 at 9:31 PM
Hello,

Thank you for reporting this bug. We made sure next release of compiler doesn't have this issue with Boost 1.48.

Thanks,
Ulzii Luvsanbat
Visual C++ Team
Posted by MS-Moderator09 [Feedback Moderator] on 11/20/2011 at 8:57 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 11/20/2011 at 6:48 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.