clang-tools-extra/docs/clang-tidy/checks/cert/msc50-cpp.rst
raw| 1 | .. title:: clang-tidy - cert-msc50-cpp |
| 2 | |
| 3 | cert-msc50-cpp |
| 4 | ============== |
| 5 | |
| 6 | Pseudorandom number generators use mathematical algorithms to produce a sequence |
| 7 | of numbers with good statistical properties, but the numbers produced are not |
| 8 | genuinely random. The ``std::rand()`` function takes a seed (number), runs a |
| 9 | mathematical operation on it and returns the result. By manipulating the seed |
| 10 | the result can be predictable. This check warns for the usage of |
| 11 | ``std::rand()``. |