From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] libxc, libxenstore: make the headers C++-friendly Date: Tue, 22 Jan 2013 17:30:59 +0000 Message-ID: <50FECCD3.9090509@citrix.com> References: <93e5f6cf98d2ae3539db.1358873051@rcojocaru.dsd.ro> <50FED22102000078000B86C8@nat28.tlf.novell.com> <50FEC73B.7020208@gmail.com> <50FED67602000078000B86EA@nat28.tlf.novell.com> <50FECAAE.40104@gmail.com> <1358875480.3279.396.camel@zakaz.uk.xensource.com> <50FECC7A.9060108@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50FECC7A.9060108@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: Ian Campbell , Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 22/01/13 17:29, Razvan Cojocaru wrote: >> What about if you do >> #define private pprivate >> #include >> ? The correct way is: #define private pprivate #include #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 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