From 35a469e97aed95be8abcf58c0f43e85bfcd8c6ab Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Wed, 29 Oct 2025 14:45:08 +0100 Subject: [PATCH] Replace branched assertions with single assertion to fix compile error --- include/boost/random/mersenne_twister.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/boost/random/mersenne_twister.hpp b/include/boost/random/mersenne_twister.hpp index 5fefb28..dfdc2d7 100644 --- a/include/boost/random/mersenne_twister.hpp +++ b/include/boost/random/mersenne_twister.hpp @@ -434,10 +434,7 @@ private: // already know what they are. for(std::size_t j = 0; j < num_bits; ++j) { if(tmp.i >= n) tmp.twist(); - if(j == num_bits - 1) - assert((tmp.x[tmp.i] & 1) == 1); - else - assert((tmp.x[tmp.i] & 1) == 0); + assert((tmp.x[tmp.i] & 1) == (j == num_bits - 1)); ++tmp.i; } detail::polynomial phi;