--- David Abrahams wrote:
I take it back; I'm pretty sure this has nothing to do with forwarding. On what line of *your code* does that error appear?
The error appears on the line with the // error comment.
I suggest you reduce your problem to the minimal example that reproduces the problem.
I've replaced uniform_int and variate_generator with the old-school rng() * (min - max) + min, and replaced mt19937 with a trivial number generator whose () operator increments an internal counter before returning the counter's value. The error now states that calling rng() from within the function 'discards qualifiers', so I've indeed run into the forwarding problem. In my project, I cannot rearrange the parameters so that rng_engine is in the last position because a few of the other parameters accept defaults. However, because there are only a few such parameters, and because rng_engine is the only non-const parameter, writing the overloads myself (via Boost.Preprocessor and custom macros, of course) is a viable alternative. Thanks! Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com