[Backport branch/3.3.x] [thrust] Fix thrust::transform test for gcc-15
#8921
+24
−9
thrust::transform test for gcc-15
#8921