is_mutex_type<recursive_mutex> is false if BOOST_NO_CXX11_SFINAE_EXPR is defined
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start in include/boost/thread/lockable_traits.hpp around lines 143-146 and compare the old has_member_try_lock implementation with the working version introduced by commit a35ffa3a83e6f74262d66feac66ef5b513c99745. Check the BOOST_NO_CXX11_NOEXCEPT guard and verify that is_mutex_type<recursive_mutex> is true when BOOST_NO_CXX11_SFINAE_EXPR is defined.
Written by the indexing model from the issue text.
Description
This part of the old has_member_try_lock implementation fails to match recursive_mutex::try_lock() because it's noexcept:
The bug is still there in the current code, but hidden by a35ffa3a83e6f74262d66feac66ef5b513c99745 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
- Dominant language
- C++
- Stars
- 213
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/thread
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100