Boost C++ Libraries: Ticket #4132: Use of "id" as a variable name makes Boost unusable in Objective-C++ https://svn.boost.org/trac10/ticket/4132 <p> I included a C++ object in an Objective-C++ file and compilation failed with "Expected primary-expression before..." It turns out that two relevant files were using "id" as a variable name. "id" is a keyword in Objective-C++. </p> <p> Changing the variable name to "idx" (which appears to be more descriptive of its use anyway) eliminated the error. </p> <p> Patch attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4132 Trac 1.4.3 Gavin Stokes <stokestack@…> Wed, 21 Apr 2010 11:23:40 GMT attachment set https://svn.boost.org/trac10/ticket/4132 https://svn.boost.org/trac10/ticket/4132 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patchfile.patch</span> </li> </ul> <p> patch to basic_regex_creator.hpp and perl_matcher_common.hpp </p> Ticket John Maddock Wed, 05 May 2010 17:40:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4132#comment:1 https://svn.boost.org/trac10/ticket/4132#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/61789" title="Change &#34;id&#34; to &#34;idx&#34; to be Objective C++ compatible. Fixes #2306. ...">[61789]</a>) Change "id" to "idx" to be Objective C++ compatible. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2306" title="#2306: Bugs: boost regex lib problems with ObjectiveC++ (closed: fixed)">#2306</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4132" title="#4132: Patches: Use of &#34;id&#34; as a variable name makes Boost unusable in Objective-C++ (closed: fixed)">#4132</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4191" title="#4191: Patches: c++ library using regex included in objective-c needs rename of variable id (closed: fixed)">#4191</a>. </p> Ticket