[Xcb] XSLT

Jochen Keil jochen.keil at gmail.com
Tue Jun 10 04:02:42 PDT 2014


Hi,

On 25.05.2014 18:12, Alexander Mezin wrote:
> 2014-05-20 17:15 GMT+07:00 Jochen Keil <jochen.keil at gmail.com>:
>> did you take a look at [1]?
>>
>> I announced it on this list end of march, but received little to no
>> feedback. Maybe it already does what you want.
> 
> Did anybody tell you that GCC crashes on it?

Nope, and without a crash report I cannot fix it.
Apart from that, what GCC version did you use?
It works perfectly fine here:

$ gcc --version
gcc (GCC) 4.8.2 20131219 (prerelease)

> Also, for me your code looks too complex. Your code is full of
> template tricks, and I try to avoid them when possible.

That's the price of generality. This code is highly reusable and that's
not some template tricks, it's template meta-programming, a well known
and understood C++ idiom. C++11 even improved the support for this by
supplying a library full of trait functions.
If you want to do type-level programming in C++ you have to use templates.

> If I remember correctly, such errors was caused by boost.xpressive.

I did not use boost.

> And I don't like hard dependency on C++11. It's supported almost
> everywhere now, but sometimes it still isn't possible to enable C++11
> (big old projects again).

You won't convert big old projects from Xlib to XCB either.
C++11 is the best thing that happened to C++ in the past 10+ years. If
you don't like it, then don't use it, but you're shooting yourself in
the foot here.

Same goes for a XCB C++ wrapper. Without C++11, I'm sure it's going to
be rather clunky and full of code duplication.
In addition, if you want to provide RAII (why would you not) you will
have to implement smart pointers yourself or use boost. `std::smart_ptr`
is part of the C++11 library and it is event thread safe!

Anyhow, good luck on inventing the wheel a second time. :)

Best wishes,

Jochen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20140610/f01304d7/attachment.sig>


More information about the Xcb mailing list