Eclipse CDT code analysis thinks size_t is ambiguous
Posted
by
Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2013-07-01T22:50:01Z
Indexed on
2013/07/01
23:05 UTC
Read the original article
Hit count: 628
eclipse-cdt
It does, after all, get defined in stddef.h AND c++config.h:
c++config.h:
namespace std
{
typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#ifdef __GXX_EXPERIMENTAL_CXX0X__
typedef decltype(nullptr) nullptr_t;
#endif
}
stddef.h:
#define __SIZE_TYPE__ long unsigned int
So when a file does using namespace std
, the Eclipse CDT code analysis gets confused and says the symbol is ambiguous. I don't know how gcc works around this, but does anybody have any suggestions on what to do for the eclipse code analysis?
© Stack Overflow or respective owner