[C++-sig] GNU gettext and "_"

David Abrahams david.abrahams at rcn.com
Thu Jun 20 20:17:43 CEST 2002


From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>

> This is what made me worried:
>
> > enum slice_nil
> > {
> > #ifndef _
> >     _
> > #endif
> > };
>
> Isn't this an invitation to write non-portable code?

No, it's a concession to the real world.
If someone's #defined _ in your environment, write slice_nil() instead.

> > Because it's the best interface for manipulating Python objects.
>
> I'd argue that Python is the best interface for manipulating Python
object.

Bleah. It's the best interface you'll get in C++ for manipulating Python
objects.

> > Occasionally you want to write functions in C++ that have to interface
with
> > Python objects. Boost.Python is not intended to restrict people to
doing
> > that sort of interaction on the Python side.
>
> That's all fine. If you don't use defines like the one above you will not
see
> me arguing.

I'm not using #defines like the one above. I'm just staying out of their
way when they crop up.

-Dave






More information about the Cplusplus-sig mailing list