Boost C++ Libraries: Ticket #3192: sorted_erdos_renyi_iterator fails assertion for default value of "prob" https://svn.boost.org/trac10/ticket/3192 <p> The sorted_erdos_renyi_iterator constructor will fail an assertion in geometric_distribution.hpp when the "prob" parameter is left with its default value of 0. Changing the value of the parameter fixes the problem. </p> <p> Output from a Boost test run: /usr/include/boost/random/geometric_distribution.hpp:44: boost::geometric_distribution&lt;<a class="missing wiki">IntType</a>, <a class="missing wiki">RealType</a>&gt;::geometric_distribution(const <a class="missing wiki">RealType</a>&amp;) [with <a class="missing wiki">IntType</a> = unsigned int, <a class="missing wiki">RealType</a> = double]: Assertion `<a class="missing wiki">RealType</a>(0) &lt; _p &amp;&amp; _p &lt; <a class="missing wiki">RealType</a>(1)' failed. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3192 Trac 1.4.3 Andrew Sutton Tue, 07 Jul 2009 13:03:48 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/3192#comment:1 https://svn.boost.org/trac10/ticket/3192#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">Boost 1.41.0</span> </li> </ul> <p> Fixed in (<a class="changeset" href="https://svn.boost.org/trac10/changeset/54769" title="Changed the default probability to the sorted_erdos_renyi_generator to ...">r54769</a>) Changed the default probability to 0.5. Since the previous default caused an assertion, a new default value should not cause problems. </p> Ticket