From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Razvan Cojocaru <rzvncj@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxc, libxenstore: make the headers C++-friendly
Date: Tue, 22 Jan 2013 17:30:59 +0000 [thread overview]
Message-ID: <50FECCD3.9090509@citrix.com> (raw)
In-Reply-To: <50FECC7A.9060108@gmail.com>
On 22/01/13 17:29, Razvan Cojocaru wrote:
>> What about if you do
>> #define private pprivate
>> #include <mem_event.h>
>> ?
The correct way is:
#define private pprivate
#include <foo>
#undef private
...
Given these complications, would it perhaps be better to define some
specific "C++ headers" for libxc etc which correctly wrap the C ones ?
I dont think it is unreasonable to say "C++ consumers should include
<foo.hpp> instead of foo.h"
~Andrew
> Then when I write my classes, and like a good C++ citizen, try to hide
> as much implementation detail as possible, my class becomes from this:
>
> class XenHandle {
> // ...
> private:
> xc_interface *xci_;
> };
>
> this:
>
>
> class XenHandle {
> // ...
> pprivate:
> xc_interface *xci_;
> };
>
> Cheers,
> Razvan Cojocaru
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-01-22 17:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 16:44 [PATCH] libxc, libxenstore: make the headers C++-friendly Razvan Cojocaru
2013-01-22 16:53 ` Jan Beulich
2013-01-22 17:02 ` Ian Campbell
2013-01-22 17:18 ` Razvan Cojocaru
2013-01-22 17:19 ` Jan Beulich
2013-01-22 17:07 ` Razvan Cojocaru
2013-01-22 17:12 ` Jan Beulich
2013-01-22 17:21 ` Razvan Cojocaru
2013-01-22 17:24 ` Ian Campbell
2013-01-22 17:29 ` Razvan Cojocaru
2013-01-22 17:30 ` Andrew Cooper [this message]
2013-01-22 17:26 ` Jan Beulich
2013-01-22 17:26 ` Razvan Cojocaru
2013-01-22 17:31 ` Tim Deegan
2013-01-22 17:44 ` Razvan Cojocaru
2013-01-23 8:25 ` Jan Beulich
2013-01-22 16:57 ` Tim Deegan
2013-01-22 17:12 ` Razvan Cojocaru
2013-01-22 17:28 ` Tim Deegan
2013-01-22 17:34 ` Razvan Cojocaru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FECCD3.9090509@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=rzvncj@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.