Tag
C++
3 posts tagged C++, newest first.
C++ | How to Safely Initialize std::mt19937
Analyzes the randomness weaknesses of seeding std::mt19937 with std::random_device and the default std::seed_seq, and shows how to initialize it correctly using /dev/urandom.
C++ | A Few Useful Preprocessor Directives
A collection of practical C++ preprocessor directives: printing a variable's name, conditional compilation by C++ version, preventing duplicate header inclusion, and compiler flags for aggressive optimization.
C++ | Comparing const and constexpr
Compares the semantics of const and constexpr in C++ for objects and functions, with examples covering member functions and constexpr functions.