In the previous chapter, you learned about regular expressions, a feature that has been part of the C++ standard library since C++11, but which is still little-known by many programmers. You saw that regular expressions are useful in two situations at the opposite ends of the C++ spectrum--in complex programs requiring bulletproof parsing of complicated input formats, and in trivial scripts where the important things are readability and speed of development.
Another library feature that lands squarely in both of these categories is random number generation. Many scripting programs require a little bit of randomness here and there, but C++ programmers have been taught for decades that the classic libc rand() function is passé. At the other end of the spectrum, rand() is spectacularly inappropriate, both for cryptography and for complicated numerical simulations...