Is this a Bug of VS 2005?
We know size_t is not a built-in data type in C++, rather, it is just a
typedef declaration.
However, I found the following code could be normally compiled with VS
2005:
// Note that I don't include any header file in this source file
size_t Test(size_t a)
{
return a;
}
int main()
{
size_t n = Test(8);
return n;
}
Why? Is this really a bug of VS 2005?
Gerry Hickman - 09 Aug 2006 20:37 GMT
Hi,
Have you checked all the project settings with care? There are some
bizarre "inheritance" issues with VS2005 projects. How did you create
the project in the first place?
It seems the build-in projects will inherit certain defaults from
project "templates". Look out for this, even if it's not relevant to
this topic.
What do you see if you right-click size_t and tell it to find the
declaration and definition?
> Is this a Bug of VS 2005?
>
[quoted text clipped - 19 lines]
>
> Why? Is this really a bug of VS 2005?

Signature
Gerry Hickman (London UK)