Subject: [Boost-bugs] [Boost C++ Libraries] #10264: [smart_ptr] AIX 6.1 bug with sched_yield() function out of scope
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-28 15:56:20
#10264: [smart_ptr] AIX 6.1 bug with sched_yield() function out of scope
-----------------------------------------------+-----------------------
Reporter: Axel Ismirlian <axel.ismirlian@â¦> | Owner: pdimov
Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
-----------------------------------------------+-----------------------
The error that pops up in some of the lambda tests is the following:
../libs/lambda/test/algorithm_test.cpp:37:48: error: reference to 'var' is
ambiguous
protect((_1 = var(sum), ++var(sum)))));
^
In file included from /usr/include/sys/thread.h:37:0,
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:
/usr/include/sys/var.h:59:8: note: candidates are: struct var
struct var {
^
In file included from ../boost/lambda/core.hpp:53:0,
from ../boost/lambda/lambda.hpp:14,
from ../libs/lambda/test/algorithm_test.cpp:16:
../boost/lambda/detail/lambda_functor_base.hpp:66:19: note:
template<class T> boost::lambda::lambda_functor<T>
boost::lambda::var(const boost::lambda::lambda_functor<T>&)
lambda_functor<T> var(const lambda_functor<T>& t) { return t; }
^
../boost/lambda/detail/lambda_functor_base.hpp:60:38: note:
template<class T>
boost::lambda::lambda_functor<boost::lambda::identity<T&> >
boost::lambda::var(T&)
inline lambda_functor<identity<T&> > var(T& t) { return identity<T&>(t);
}
^
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.
Please look at the Pull Request created for further details:
https://github.com/boostorg/smart_ptr/pull/7
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10264> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC