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

Bug 350343

Summary: codan doesn't like std::cout << std::vector<>::size() << std::endl, giving "Invalid overload of std::endl"
Product: [Tools] CDT Reporter: Cornelius Missing name <trivial+eclipsebugs>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: RESOLVED WORKSFORME QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, malaperle
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Cornelius Missing name CLA 2011-06-25 00:17:23 EDT
Build Identifier: 20110615-0604

Codan doesn't like the following testcase, giving the error "Invalid overload of std::endl" for no apparent reason


The testcase is:
#include <iostream>
#include <vector>
void func() {
	std::vector<int> v;
	std::cout << "size " << v.size() << std::endl;
}


Reproducible: Always
Comment 1 Marc-André Laperle CLA 2011-06-25 02:06:17 EDT
It works for me on Linux (Ubuntu 11.4) with gcc 4.5.2. What do you use? Have you tried reindexing? Right-click on the project, Index, Rebuild. Does it go away when you start typing? It could be a manifestation of bug 342647. Also, do you see the gcc c++ paths in Project Explorer? They in the tree under your project, Includes.
Comment 2 Cornelius Missing name CLA 2011-06-25 11:51:52 EDT
that's weird, after reindexing and rerunning codan it disappeared. I saw this on two different projects, one newly created to check for this bug.
I'm on fedora 15 with gcc 4.6, so I've got a newer stdlibc++ than you which may use more C++0x features CDT doesn't yet understand.
The bug is probably bogus then, sorry.
Comment 3 Markus Schorn CLA 2011-07-04 08:07:34 EDT
Seems to be working.