Date: Thu, 16 Jan 2014 13:46:21 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Hans Petter Selasky <hps@bitfrost.no> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: Make "sys/queue.h" usable with C++ Message-ID: <1679.1389879981@critter.freebsd.dk> In-Reply-To: <52D7D302.3090403@bitfrost.no> References: <52D7D302.3090403@bitfrost.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <52D7D302.3090403@bitfrost.no>, Hans Petter Selasky writes: >Hi, > >I'm using "sys/queue.h" with some C++ programs. The only problem is that >you cannot make an ENTRY() using classes without getting some compiler >warnings, because all macros in "sys/queue.h" assume "struct". I came >< this close to removing the assumed struct many years ago when I orthogonalized sys/queue.h, but were persuaded by others that it was pointless and that nobody were ever going to use it with C++ anyway, C++ being so much more evolved in such aspects :-) Wouldn't #ifndef SYS_QUEUE_STRUCT # define SYS_QUEUE_STRUCT struct #endif Make more sense ? That would allow C code to also make the struct explicit. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1679.1389879981>