This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH: PR 20599 (1/3)
On Sep 25, 2006, at 9:35 AM, Gabriel Dos Reis wrote:
| 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
Ah, sorry, I misunderstood your user interface:
g++ my_source.cpp -D _STD_RVALUE_REF -D _STD_VARIADIC_TEMPLATES -D
_STD_STATIC_ASSERT -D BOOST_RVALUE_REFS -D BOOST_VARIADIC_TEMPLATES -
D BOOST_STD_STATIC_ASSERT -D ACME_RVALUE_REFS_ON -D
ACME_USE_VARIADIC_TEMPLATES -D ACME_USE_STATIC_ASSERT -
enable_rvalue_refs -enable_variadic_templates -enable_static_assert -
I would prefer something more like:
g++ my_source.cpp -enable_rvalue_refs -enable_variadic_templates -
enable_static_assert -lboost -lAcme
I.e. the main difference is that we are discussing is whether or not
gcc standardizes the spelling of these feature test macros, and
supplies them automatically.