https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121919
Bug ID: 121919 Summary: ranges::shuffle and ranges::sample assume a uniform_random_bit_generator provides result_type Product: gcc Version: 15.2.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- The std::uniform_random_bit_generator concept does not require a result_type member, but we assume there is one: using __uc_type = common_type_t<typename remove_reference_t<_Gen>::result_type, __ud_type>; And also in uniform_int_distribution: typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; We should use decltype(__g()) instead. Full testcase to follow ...