Boost logo

Boost Users :

Subject: [Boost-users] error: ‘class boost::mutex’ has no member named ‘try_lock_for’
From: Antonis Polykratis (antonis.polykratis_at_[hidden])
Date: 2018-09-25 13:30:25


Hi,
I face this error, in linux, does this indicates that I have not build the
library correctly?
the error is in that line:
boost/thread/lock_types.hpp:162:45

#ifdef BOOST_THREAD_USES_CHRONO
    template <class Clock, class Duration>
    unique_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
    : m(&mtx), is_locked(mtx.try_lock_until(t))
    {
    }
    template <class Rep, class Period>
    unique_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
    : m(&mtx), is_locked(mtx.try_lock_for(d)) <--- here is the error
    {
    }
#endif

Thanks,
Antonis



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net