Boost C++ Libraries: Ticket #10264: [smart_ptr] AIX 6.1 bug with sched_yield() function out of scope https://svn.boost.org/trac10/ticket/10264 <p> The error that pops up in some of the lambda tests is the following: </p> <p> ../libs/lambda/test/algorithm_test.cpp:37:48: error: reference to 'var' is ambiguous </p> <blockquote> <p> protect((_1 = var(sum), ++var(sum))))); </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from /usr/include/sys/thread.h:37:0, </p> <blockquote> <p> from /usr/include/sys/ptrace.h:28, from /usr/include/sys/proc.h:42, from /usr/include/sys/pri.h:43, from /usr/include/sys/sched.h:38, from /usr/include/sched.h:51, from ../boost/smart_ptr/detail/yield_k.hpp:101, from ../boost/smart_ptr/detail/spinlock_sync.hpp:18, from ../boost/smart_ptr/detail/spinlock.hpp:50, from ../boost/smart_ptr/detail/spinlock_pool.hpp:25, from ../boost/smart_ptr/shared_ptr.hpp:34, from ../boost/shared_ptr.hpp:17, from ../boost/test/utils/callback.hpp:21, from ../boost/test/execution_monitor.hpp:38, from ../boost/test/impl/execution_monitor.ipp:30, from ../boost/test/minimal.hpp:37, from ../libs/lambda/test/algorithm_test.cpp:14: </p> </blockquote> <p> /usr/include/sys/var.h:59:8: note: candidates are: struct var </p> <blockquote> <p> struct var { </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from ../boost/lambda/core.hpp:53:0, </p> <blockquote> <p> from ../boost/lambda/lambda.hpp:14, from ../libs/lambda/test/algorithm_test.cpp:16: </p> </blockquote> <p> ../boost/lambda/detail/lambda_functor_base.hpp:66:19: note: template&lt;class T&gt; boost::lambda::lambda_functor&lt;T&gt; boost::lambda::var(const boost::lambda::lambda_functor&lt;T&gt;&amp;) </p> <blockquote> <p> lambda_functor&lt;T&gt; var(const lambda_functor&lt;T&gt;&amp; t) { return t; } </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> ../boost/lambda/detail/lambda_functor_base.hpp:60:38: note: template&lt;class T&gt; boost::lambda::lambda_functor&lt;boost::lambda::identity&lt;T&amp;&gt; &gt; boost::lambda::var(T&amp;) </p> <blockquote> <p> inline lambda_functor&lt;identity&lt;T&amp;&gt; &gt; var(T&amp; t) { return identity&lt;T&amp;&gt;(t); } </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In ../boost/lambda/detail/lambda_functor_base.hpp there is variable called var that conflicts with an AIX system variable. Defining var and later undefining it frees that variable name. However, the fix I propose is in the smart_ptr function. </p> <p> Please look at the Pull Request created for further details: <a class="ext-link" href="https://github.com/boostorg/smart_ptr/pull/7"><span class="icon">​</span>https://github.com/boostorg/smart_ptr/pull/7</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10264 Trac 1.4.3