Skip to content

Commit 8a32a16

Browse files
authored
Merge pull request #153 from boostorg/int
Cast result to the proper result type
2 parents 5b191b0 + dbd4281 commit 8a32a16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/boost/random/uniform_int_distribution.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ T generate_uniform_int(
120120
if(mult * range_type(brange) == range - mult + 1) {
121121
// The destination range is an integer power of
122122
// the generator's range.
123-
return(result);
123+
return static_cast<result_type>(result);
124124
}
125125

126126
// Postcondition: mult <= range

0 commit comments

Comments
 (0)