<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - `explicit` is a C++11 keyword, add to _cplusplus_annoyances (with patch)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74080#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - `explicit` is a C++11 keyword, add to _cplusplus_annoyances (with patch)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=74080">bug 74080</a>
from <span class="vcard"><a class="email" href="mailto:mike@kmcardiff.com" title="mike@kmcardiff.com">mike@kmcardiff.com</a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=74080#c1">comment #1</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=74080#c0">comment #0</a>)
> > Created <span class=""><a href="attachment.cgi?id=92810" name="attach_92810" title="Patch for c_client.py to fix cpp keywords & lookup error">attachment 92810</a> <a href="attachment.cgi?id=92810&action=edit" title="Patch for c_client.py to fix cpp keywords & lookup error">[details]</a></span>
> > 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:
> <a href="http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBstr">http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBstr</a>.
> h?id=5e40da736ffc87f5cafaaa67d745e20ef67a9f4a#n308
> 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.</span >
Ran Benita,
I just want to extend/amplify what Mr. Keil says.
The explicit keyword for C++ constructors was in use in the '90's and
standardized in C++98, the first C++ standard.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>