Re: STL annoyances
On 26 Mai, 22:33, Pete Becker wrote:
On 2010-05-26 10:28:34 -1000, Dann Corbit said:
How is it that the STL (which is part of the standard) can be
so utterly incompatible between various compilers?
For instance, with Microsoft VC++, to include functional, the
surrounding namespace is cliext. But with g++, the namespace
is tr1.
functional is not yet part of the C++ standard.
What "functional" are you guys talking about? From what I can tell C+
+03 *does* offer a <functional> header. Are you referring to the TR1
extensions?
[...]
That difference goes away if you set your include paths right
What *is* right?
Does TR1 even mention how to "correctly" include the headers? As far
as I remember it doesn't. Please correct me if I'm wrong.
GCC's documentation ( see http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk=
01pt01ch03s02.html
) lists the TR1 headers as "tr1/something" where "something" is a
placeholder for array, regex, type_traits, etc. I didn't notice any
statement of the form "you can set your include paths so and so to be
able to include the TR1 headers like they are supposed to be
included".
The way I see it: TR1 failed to specify how the headers should be
included. That's a big fail, IMHO.
Cheers,
SG