Boost C++ Libraries: Ticket #1270: uniform_smallint doesn't compile with lagged_fibonacci random number generators https://svn.boost.org/trac10/ticket/1270 <p> Code like this: </p> <pre class="wiki">boost::lagged_fibonacci607 rng; ... boost::uniform_smallint&lt;int&gt; myrand(1,10); int a = myrand(rng); </pre><p> yields errors like these: </p> <pre class="wiki">/local/include/boost/random/uniform_smallint.hpp:195: error: invalid operands of types 'double' and 'double' to binary 'operator%' /local/include/boost/random/uniform_smallint.hpp:204: error: invalid operands of types 'double' and 'double' to binary 'operator%' </pre><p> gcc version 4.0.1 (Apple Computer, Inc. build 5367) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1270 Trac 1.4.3 Marshall Clow Sat, 09 Feb 2008 01:09:59 GMT owner set https://svn.boost.org/trac10/ticket/1270#comment:1 https://svn.boost.org/trac10/ticket/1270#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">No-Maintainer</span> </li> </ul> Ticket Steven Watanabe Fri, 06 Feb 2009 23:01:01 GMT <link>https://svn.boost.org/trac10/ticket/1270#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1270#comment:2</guid> <description> <p> uniform_smallint requires the generator to return an integral type. lagged_fibonacci607 returns doubles. Use variate_generator. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 23 Feb 2009 02:36:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/1270#comment:3 https://svn.boost.org/trac10/ticket/1270#comment:3 <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">wontfix</span> </li> </ul> Ticket