Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332280

Summary: Parser cannot recognize conversion from a function to boost::function
Product: [Tools] CDT Reporter: Nathan Ridge <zeratul976>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: CLOSED DUPLICATE QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
preprocessed source code none

Description Nathan Ridge CLA 2010-12-10 03:42:54 EST
Created attachment 184925 [details]
preprocessed source code

The parser gives an error for the following code:

#include <boost/function.hpp>
void f(boost::function<void()> f) {}
void g();
int main()
{
    f(g);  // ERROR HERE
    return 0;
}

The error is:

Invalid arguments Candidates are: void f(boost::function<void ()>)

The code is valid and compiles fine with g++ 4.x

I have attached the preprocessed source code.
Comment 1 Markus Schorn CLA 2010-12-23 07:23:21 EST

*** This bug has been marked as a duplicate of bug 322467 ***