|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxc, libxenstore: make the headers C++-friendly
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@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |