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

Bug 326076

Summary: Invalid overload for templated argument
Product: [Tools] CDT Reporter: Marc-AndrĂ© Laperle <malaperle>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Mike Kucera <mikekucera>
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
testcase + fix mschorn.eclipse: iplog-

Description Marc-André Laperle CLA 2010-09-23 12:57:01 EDT
Using CDT 8.0 (201009161207)

#include <vector>
#include <algorithm>
using namespace std;

template<typename T>
bool MySort(const T& a, const T& b) {
    return(true);
}

int main() {
	vector<int>  test;
	sort(test.begin(), test.end(), MySort<int>);
	return 0;
}


MySort<int> generates an error (codan) "Invalid overload". This is not the case in 7.0 (using Problems syntax coloring). Maybe this is caused by the fix in bug 85843?
Comment 1 Markus Schorn CLA 2010-09-28 08:19:26 EDT
Created attachment 179731 [details]
testcase + fix

Thanks Marc!
Comment 2 Markus Schorn CLA 2010-09-28 08:21:56 EDT
Fixed in 8.0 > 20100928.