C++ PATCH: PR 20599 (1/3)
Gabriel Dos Reis
Mon Sep 25 13:38:00 GMT 2006
Howard Hinnant <email@example.com> writes:
| On Sep 25, 2006, at 7:30 AM, Gabriel Dos Reis wrote:
| > "Peter Dimov" <firstname.lastname@example.org> writes:
| > [...]
| > | > you can use that library code only if GCC gets to the point of
| > | > compiling it -- which can't happen when the compiler does not
| > | > understand the option. Concretely, the feature-test is illusory
| > | > unless you also change how
| > | > GCC handls unrecognized command-line options.
| > |
| > | But the library could support both modes, with or without the
| > | option.
| > I do not disagree with that. However, it could be practically used
| > in the extended mode only if you know in advance that the compiler
| > supports it (because you have to explicit ask for it), which means
| > you're actually in the position of supplying the guarding macro.
| Without a feature-test macro, the library author will have to supply
| two separate implementations, and tell their clients: Use this
| version over here if you enable this feature, else use that version
| over there.
No. The *library author* defines the macros that guard its uses of
the specific GCC extensions. He/she does not need to provide two
More information about the Libstdc++