[Xcb] [Bug 74080] `explicit` is a C++11 keyword, add to _cplusplus_annoyances (with patch)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 11 12:25:52 PST 2014


--- Comment #1 from Ran Benita <ran234 at gmail.com> ---
(In reply to comment #0)
> Created attachment 92810 [details]
> Patch for c_client.py to fix cpp keywords & lookup error
> As said in the summary, `explicit` is a C++11 keyword, which makes (at
> least) xkb.h fail when included in C++11 sources.
> Attached is a fix for this ("explicit" => "_explicit" dictionary entry in
> _cplusplus_annoyances).
> However, it's unfortunately not done with updating the dict, some lookups
> for `field.c_type_name` will now fail. Hence, the reverse cpp keyword lookup.

Hmm, so c++11 just suddenly stole the word 'explicit' and expected everything
to work out? Unfortunately, you can't change it this way anymore, because that
would break the API. What you should do is something like this:
i.e. do the renaming conditionally in the header. I don't think there are any
old c++ clients using this field, but if there are, hopefully you can avoid
breaking them as well.

I guess you can also sidestep the issue entirely by '#define explicit
_explicit' or so before including xkb.h.

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20140211/e18aaf42/attachment.html>

More information about the Xcb mailing list