Just to answer his question: most compilers don't follow the
standard 100%, or even try to. Comeau does, but I don't know of
another. Also, you typically need special options to get as
close as possible to the standard. By default, most compilers
can be very, very far from the standard.
On the other hand, the subject of this group is more or less
portable C++. The way different compilers deviate from the
standard isn't usually very portable. (The one big exception
being that most compilers don't implement export.) So in
general, you should try to find out what is and what isn't
standard (and which standard---in my own work, I use a lot of
standards: C++, Posix, quite a few RFC's...). And avoid what
isn't standard (or rather, what isn't more or less universally
supported) when you don't need it.
I wouldn't worry about it too much Tom. Some users get upset
at a few things and refuse to answer questions if a post
contains them. Such as:
void main()
main MUST return an int.
int _tmain(int argc, _TCHAR* argv[])
this is how windows specific code handles the mainline in
code. Even though everyone knows there IS a main()
somewhere that calls _tmain() some people get upset because
it's not called main.
C/C++
The langauge is not called C/C++ it's called C or C++, pick one
Depending on the question, this may or may not be relevant. I
use "C/C++" myself when talking about things like sequence
points, or what the standard requires of an int.
If we start accepting _tmain without comment, then in a few moments
we'll be back to 1995 situation where clc++ had devolved into a Windows
programming group.
Do you really think so? My impression is that the web has moved
on, and that the sort of people who don't care, and who created
the 1995 situation have 1) moved on to newer, more in languages,
and 2) aren't even aware that newsgroups exist---they're more
into blogs and such today. This is obviously speculation on my
part, but one thing is clear: around 1995, this group did become
unusable, because of off topic postings, and that constantly
signaling such postings didn't change anything. And that today,
there's no real problem. The poster in this thread had a real
C++ question, which obviously doesn't depend on the platform,
and his posting would have been accepted even in a moderated
group. As Jim said, a short comment reminding him (or informing
him to begin with) that _tmain wasn't standard C++ wouldn't
necessarily be a bad idea, as a secondary comment in a posting
answering his real question, but it hardly justifies a complete
posting in itself. The situation concerning off topic postings
here is far from being bad enough to require a knee-jerk
reaction, and from history, I can assure you that a knee-jerk
reaction won't change anything anyway.