Fix Boost API compatibility: remove deprecated bytes_type::size() calls
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 27 Dec 2025 16:19:56 +0000 (17:19 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 27 Dec 2025 16:19:56 +0000 (17:19 +0100)
Remove BOOST_ASSERT with address_v4/address_v6::bytes_type::size() as the
new Boost API no longer provides a static size() method on std::array.

src/tcp/tcpheader.cpp

index ac820af..5eedee5 100644 (file)
@@ -288,9 +288,6 @@ uint16_t TcpHeader::calculate_tcp_checksum(
 
     PseudoIpv4Header pseudo_header;
 
-    BOOST_ASSERT( address_v4::bytes_type::size() == sizeof(pseudo_header.source_address) );
-    BOOST_ASSERT( address_v4::bytes_type::size() == sizeof(pseudo_header.destination_address) );
-
     // Byte ordering (i.e. endianness) is handle by Boost.Asio
     copy( src_addr.begin(), src_addr.end(), pseudo_header.source_address );
     copy( dest_addr.begin(), dest_addr.end(), pseudo_header.destination_address );
@@ -353,9 +350,6 @@ uint16_t TcpHeader::calculate_tcp_checksum(
 
     PseudoIpv6Header pseudo_header;
 
-    BOOST_ASSERT( address_v6::bytes_type::size() == sizeof(pseudo_header.source_address) );
-    BOOST_ASSERT( address_v6::bytes_type::size() == sizeof(pseudo_header.destination_address) );
-
     copy( src_addr.begin(), src_addr.end(), pseudo_header.source_address );
     copy( dest_addr.begin(), dest_addr.end(), pseudo_header.destination_address );
     fill_n( pseudo_header.zero_byte, 3, 0 );