Skip to content

Commit def6a38

Browse files
Test bitset assignment ops return lvalue refs
1 parent 67d167d commit def6a38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/testEnumUtils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ BOOST_AUTO_TEST_CASE(Operators)
4141
BOOST_TEST(static_cast<unsigned>(b) == 0b001u);
4242
b |= Bitset::B;
4343
BOOST_TEST(static_cast<unsigned>(b) == 0b011u);
44+
(b |= Bitset::A) = Bitset::C; // should compile
4445
}
4546

4647
{
@@ -49,6 +50,7 @@ BOOST_AUTO_TEST_CASE(Operators)
4950
BOOST_TEST(static_cast<unsigned>(b) == 0b011u);
5051
b &= Bitset::B;
5152
BOOST_TEST(static_cast<unsigned>(b) == 0b010u);
53+
(b &= Bitset::A) = Bitset::C; // should compile
5254
}
5355
}
5456

0 commit comments

Comments
 (0)