mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
While testing a patch for std::philox_engine I noticed that instantiating std::philox_engine with n=2 and w=64 fails on targets without __int128, because it relies on an implicit conversion from the intermediate counter type to the result type. When w=64 and the target doesn't support __int128, we use the __rand_uint128 class type for the intermediate counter values, but that does not support implicit conversion to integral types. This adds the necessary casts to make the conversions explicit. libstdc++-v3/ChangeLog: * include/bits/random.tcc (philox_engine::_M_transition): Cast intermediate values to result_type for n=2 case.