Boost logo

Boost :

From: Michael Stevens (Michael.Stevens_at_[hidden])
Date: 2004-07-17 08:51:47

On Tuesday 13 July 2004 09:17, Synge Todo <wistaria_at_[hidden]> wrote:
> I'm sending a small patch for Boost.Random to compile by using
> gcc-3.4.1 (on Linux Fedora Core 2).
> Could somebody apply this patch?  Thank you in advance.

The patches add #include<cmath> to a couple of the Random headers.
This is I assume to provide std::pow definitions for builtin types.

In this situation this is wrong. The Random headers are totally generic and
can be used on a variety of numeric types. Not necessarily the builtin float
etc. It is the user's responsibility to make sure that a 'pow' is defined for
the specific type used. Random will find such definition in namespace std or
with type dependant (Konig) lookup.

This is hard on the user, but make the code generic and with the minmum of


Boost list run by bdawes at, gregod at, cpdaniel at, john at