Skip to content

Commit

Permalink
Merge pull request #65 from boostorg/feature/removed_redundant_value_…
Browse files Browse the repository at this point in the history
…logic

Feature/removed redundant value logic
  • Loading branch information
zajo authored Oct 29, 2023
2 parents e3571f4 + 867e2c9 commit 4b37ca6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,20 @@ jobs:
- toolset: clang
compiler: clang++-13
cxxstd: "11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-13
- toolset: clang
compiler: clang++-14
cxxstd: "11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-14
- toolset: clang
compiler: clang++-15
cxxstd: "11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-15
- toolset: clang
compiler: clang++-16
Expand Down
9 changes: 2 additions & 7 deletions include/boost/leaf/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,8 @@ class BOOST_LEAF_SYMBOL_VISIBLE error_id

BOOST_LEAF_CONSTEXPR int value() const noexcept
{
if( int v = value_ )
{
BOOST_LEAF_ASSERT((v&3)==1);
return (v&~3)|1;
}
else
return 0;
BOOST_LEAF_ASSERT(value_==0 || ((value_&3)==1));
return value_;
}

BOOST_LEAF_CONSTEXPR explicit operator bool() const noexcept
Expand Down

0 comments on commit 4b37ca6

Please sign in to comment.