Boost C++ Libraries: Ticket #4186: BOOST date_time:"time_resolution_traits" undeclared or ambig error on IBM XL on AIX https://svn.boost.org/trac10/ticket/4186 <p> Tests affected: interprocess/comp_doc_anonymous_mutexA interprocess/comp_doc_anonymous_mutexB interprocess/comp_doc_anonymous_semaphoreA interprocess/comp_doc_anonymous_semaphoreB interprocess/comp_doc_anonymous_upgradable_mutexA interprocess/comp_doc_anonymous_upgradable_mutexB interprocess/comp_doc_anonymous_conditionA interprocess/comp_doc_anonymous_conditionB </p> <p> The compile-time error on with IBM XL (vacpp) on AIX is occuring due to name collision between a macro name (v_type) found on the OS in /usr/include/sys/vnode.h and same named template argument found in the boost header boost/date_time/time_resolution_traits.hpp. </p> <p> Here is a reduced test that demonstrates the problem: </p> <p> t.C ========= <em> From /usr/include/sys/vnode.h enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VBAD, VFIFO, VMPC }; typedef enum vtype vtype_t; struct gnode { </em></p> <blockquote> <p> enum vtype gn_type; </p> </blockquote> <p> }; </p> <p> struct vnode { </p> <blockquote> <p> struct gnode *v_gnode; </p> </blockquote> <p> }; </p> <p> #define v_type v_gnode-&gt;gn_type </p> <p> template&lt;typename v_type = int&gt; class time_resolution_traits { }; </p> <p> ============== Command: xlC -c t.C Result: "t.C", line 15.21: 1540-0063 (S) The text "-&gt;" is unexpected. </p> <p> Note that this problem is specific to AIX due to this macro used in AIX header. Linux or other operating systems do not appear to exhibit this problem. </p> <p> The solution is to provide a Boost patch file that renames template argument to another name in order to avoid name collision with the system files. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4186 Trac 1.4.3 ccambly@… Tue, 04 May 2010 17:53:15 GMT attachment set https://svn.boost.org/trac10/ticket/4186 https://svn.boost.org/trac10/ticket/4186 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">time_resolution_traits.hpp.diff</span> </li> </ul> Ticket rockdreamer@… Tue, 19 Feb 2013 17:00:29 GMT version, milestone changed https://svn.boost.org/trac10/ticket/4186#comment:1 https://svn.boost.org/trac10/ticket/4186#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.42.0</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.43.0</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> </ul> <p> Can this patch be merged for the next release? I've been applying it from 1.4something to 1.53.0 in order to compile on AIX. </p> <p> I'm changing the milestone and version in order to make the ticket more visible. I'm sorry if this is bad etiquette. If it is, please point me to documentation on how to properly "bump" issues and I'll gladly comply. </p> <p> Thanks :) </p> Ticket