This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TR library extensions


Martin Sebor <sebor@roguewave.com> writes:

| Gabriel Dos Reis wrote:
| > Pétur Runólfsson <peturr02@ru.is> writes:
| > | Gabriel Dos Reis wrote:
| > | > | A -std= option is needed that adds include/tr1 to the include path,
| > | > | because the new tr1 headers should not be visible if -std=c++98 is
| > | > | given.
| > | > | > Why?
| > | | Consider the program
| > | | #include <tuple>
| > | int main() { }
| > | | The documentation for the -std switch says:
| > |   Specify the standard to which the code should conform
| > | This code doesn't conform to C++ 98 (because there is no header named
| > | <tuple>). Shouldn't the compiler reject it when -std=c++98 is
| > | specified?
| > I see no reason.  Do you also propose to reject
| >    #include <unistd.h>
| >
| 
| FWIW, the reason to reject the program above is for strict conformance
| (i.e., to make it easier to detect programs that are not portable to
| other implementations). The difference between your example and the
| one given by Petur is that the <unistd.h> header doesn't come with gcc
| while <tuple> presumably will.

No.  If the compiler is not configured to provide C99 support, it will
not install C99 headers (as provided by the library).  Similarly, if
the compiler is not configured to provide the TR1, it will not install
its oen view of TR1.  

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]