Boost C++ Libraries: Ticket #926: Problem with seed interface https://svn.boost.org/trac10/ticket/926 <pre class="wiki">For a random number generator x, you can call x.seed(s) where s is either an integer of the appropriate type, or a generator. This overloading causes a problem, because if s an integer type other than the DataType for x, the compiler matches it with the overload that takes a generator argument, producing a very puzzling compiler error. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/926 Trac 1.4.3 jmaurer Wed, 09 May 2001 15:36:23 GMT status changed https://svn.boost.org/trac10/ticket/926#comment:1 https://svn.boost.org/trac10/ticket/926#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=53943 This is indeed a bit surprising, but it only happens if "s" (in your above example) is an lvalue. Also, you can always cast the argument to the appropriate type first, e.g. by static_cast&lt;RNG::result_type&gt;(s) And you do get an error message if the wrong seed function is called. The documentation could be a bit more verbose about that, though (fixed). </pre> Ticket