Opened 15 years ago

Closed 14 years ago

#1546 closed Bugs (fixed)

Method boost::random::uniform_int::operator()(engine, value) is missing

Reported by: Jos Hickson <jos.hickson@…> Owned by: Marshall Clow
Milestone: Boost 1.38.0 Component: random
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

boost::random::variate_generator::operator()(T value) seems to offer the ability to use the variate_generator with std::random_shuffle(). However, it relies on the distribution used providing a method along the lines of:

template <EngineT, ValueT>
ValueT operator()(EngineT, ValueT);

According to the Boost.Random documentation this is provided by the uniform_int distribution but the actual implementation of uniform_int has no such method.

Attachments (1)

bug_1546.diff (7.9 KB ) - added by Jos Hickson <jos.hickson@…> 15 years ago.
Patch (to version 43682 of trunk) providing fix and test

Download all attachments as: .zip

Change History (7)

comment:1 by Marshall Clow, 15 years ago

Component: Nonerandom

comment:2 by Marshall Clow, 15 years ago

Owner: set to No-Maintainer

by Jos Hickson <jos.hickson@…>, 15 years ago

Attachment: bug_1546.diff added

Patch (to version 43682 of trunk) providing fix and test

comment:3 by Jos Hickson <jos.hickson@…>, 15 years ago

Added fix for this problem. This was built and tested using gcc-4.1.2 on Gentoo Linux (32-Bit).

comment:4 by jos.hickson@…, 14 years ago

The milestone for this is 1.36.0 but it seems that was missed - is this likely to be incorporated in to a future release soon? Can I apply the patch I contributed to trunk myself?

comment:5 by anonymous, 14 years ago

Milestone: Boost 1.36.0Boost 1.38.0
Owner: changed from No-Maintainer to Marshall Clow

Committed the patch as revision 50312. I'll watch the test results for a while, and then if they're good, merge to release.

comment:6 by Marshall Clow, 14 years ago

Resolution: fixed
Status: newclosed

Merged to release; closed.

Note: See TracTickets for help on using tickets.