is_mutex_type<recursive_mutex> is false if BOOST_NO_CXX11_SFINAE_EXPR is defined
Opened this issue · 1 comments
jwakely commented
This part of the old has_member_try_lock
implementation fails to match recursive_mutex::try_lock()
because it's noexcept
:
thread/include/boost/thread/lockable_traits.hpp
Lines 143 to 146 in 4abafcc
The bug is still there in the current code, but hidden by a35ffa3 which has a working version that is used by most compilers since Boost 1.69.0
A fix would be to add another partial specialization for noexcept
functions:
#ifndef BOOST_NO_CXX11_NOEXCEPT
template<typename U>
static true_type has_member(bool (U::*)() noexcept);
#endif
jwakely commented
Demo of the bug in 1.66.0: https://godbolt.org/z/hnTrsceTv