[v3] c++0x includes

Gabriel Dos Reis gdr@cs.tamu.edu
Sun Mar 11 15:32:00 GMT 2007


"Peter Dimov" <pdimov@mmltd.net> writes:

| Gabriel Dos Reis wrote:
| > "Peter Dimov" <pdimov@mmltd.net> writes:
| >
| >> Doug Gregor wrote:
| >>
| >>> What we need is for the C++ committee to define a new value of
| >>> __cplusplus for C++0x, so C libraries can start doing the right
| >>> thing...
| >>
| >> I think that you can detect C++0x without knowing the exact value by
| >> using #if __cplusplus > 199711L.
| >
| > Well, that may actually be C++03 without C++0x. :-/
| 
| I guess it could be, depending on the compiler... my copy of C++03
| still says 199711L in [cpp.predefined], though.

So does my copy.  But after C++98 was released, and while C++03 was
being developed, the above test is the only thing codes can do to test
for C++03 behaviour.  The point is that someone forgot to update
__cplusplus, contrary to what footnote 146 suggests.

-- Gaby



More information about the Libstdc++ mailing list