Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] Re: (PR#11282) [C++] typedef / struct member conflict in c
Home

[Freeciv-Dev] Re: (PR#11282) [C++] typedef / struct member conflict in c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: fbriere@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#11282) [C++] typedef / struct member conflict in client/climisc.h
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 1 Dec 2004 11:33:23 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11282 >

On Wed, 1 Dec 2004, [UTF-8] Frédéric Brière wrote:

>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=11282 >
>
> client/climisc.h has the following definition:
>
>   typedef int cid;
>   ...
>   struct item {
>     cid cid;
>     ...
>
>
> I don't know if this is allowed or not in C++, but g++ chokes on this,
> as it confuses both uses of cid.  This patch disambiguates this.

Please do not use #ifdef __cplusplus.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa








[Prev in Thread] Current Thread [Next in Thread]