mirror of
https://github.com/nlohmann/json.git
synced 2026-09-30 05:55:46 +00:00
GCC -Werror=useless-cast on Linux x86-64 rejected static_cast<std::size_t>(tokens() % n): std::mt19937_64 yields std::uint_fast64_t, which is std::size_t there. Draw the numbers through a lambda that casts a named std::uint64_t, which also makes the conversions for std::string's count explicit where std::size_t is 32 bits wide. The sequence of draws is unchanged. Signed-off-by: Niels Lohmann <mail@nlohmann.me>