From 54c841d585e2cda007a2936af252a6cb43ef1050 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Mon, 22 Dec 2025 11:53:06 +0100 Subject: [PATCH] Exercise subtraction between iterators in the unit tests Reason: This was missing. And we forgot a friend declaration for the corresponding operator-(), which will be added with the next commit. --- test/bitset_test.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/bitset_test.hpp b/test/bitset_test.hpp index 29f884f..3fb18a8 100644 --- a/test/bitset_test.hpp +++ b/test/bitset_test.hpp @@ -248,6 +248,8 @@ struct bitset_test BOOST_TEST( *( 1 + b.begin() ) == b[ 1 ] ); BOOST_TEST( *( b.end() - 1 ) == b[ b.size() - 1 ] ); } + + BOOST_TEST( b.end() - b.begin() == static_cast< std::ptrdiff_t >( b.size() ) ); } static void