incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-425) remove #include <examples.h> from example programs
Date Wed, 23 May 2007 22:08:17 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498405
] 

Martin Sebor commented on STDCXX-425:
-------------------------------------

The <examples.h> header exists to provide various workarounds for broken compilers that
we can't provide in the library (such as a conforming for loop that follows the C++ scoping
rules) and to allow us to write conforming code. We might be able to eliminate it with most
compilers but I'm not sure if we can get rid of it altogether. But it might be possible to
devise some alternate, less intrusive trick instead of explicitly #including it in each example
program. One possibility would be to replace it with a standard header (say <cstddef>)
and add a replacement <stddef> to the examples/include directory (and place that directory
before the one that contains the real header). Another option might be to use a compiler option
to "preinclude" the header (e.g., via gcc -include <header> option).

> remove #include <examples.h> from example programs
> --------------------------------------------------
>
>                 Key: STDCXX-425
>                 URL: https://issues.apache.org/jira/browse/STDCXX-425
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: Examples
>    Affects Versions: 4.1.3
>            Reporter: Mark Brown
>
> I was trying to use the stdcxx example programs to benchmark compilation and link speeds
against other libraries (g++, STLport) but the examples only compile with stdcxx because they
each include an <examples.h> header. I tried removing the #include directive from several
of the examples to see if they would still compile and they all did. It would be nice to remove
the header and make the examples compile with other C++ standard libraries as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message