c06617a79b
My previous attempt to fix this only worked when m is a power of two. There is still a bug when a=00 and !has_single_bit(m). Instead of trying to make _Mod work for a==0 this change ensures that we never instantiate it with a==0. For C++17 we can use if-constexpr, but otherwise we need to use a different multipler. It doesn't matter what we use, as it won't actually be called, only instantiated. libstdc++-v3/ChangeLog: * include/bits/random.h (__detail::_Mod): Revert last change. (__detail::__mod): Do not use _Mod for a==0 case. * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc: Check other cases with a==0. Also check runtime results. * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line. |
||
---|---|---|
.. | ||
config | ||
doc | ||
include | ||
libsupc++ | ||
po | ||
python | ||
scripts | ||
src | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
ChangeLog-1998 | ||
ChangeLog-1999 | ||
ChangeLog-2000 | ||
ChangeLog-2001 | ||
ChangeLog-2002 | ||
ChangeLog-2003 | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-2014 | ||
ChangeLog-2015 | ||
ChangeLog-2016 | ||
ChangeLog-2017 | ||
ChangeLog-2018 | ||
ChangeLog-2019 | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.host | ||
crossconfig.m4 | ||
fragment.am | ||
linkage.m4 | ||
Makefile.am | ||
Makefile.in | ||
README |
file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory. It contains brief building instructions and notes on how to configure the library in interesting ways.