
21 Jul
2004
21 Jul
'04
7:30 a.m.
From: Michael Stevens <Michael.Stevens@epost.de> Date: Sat, 17 Jul 2004 15:51:47 +0200
The patches add #include<cmath> to a couple of the Random headers. This is I assume to provide std::pow definitions for builtin types.
Yes.
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.
I am a bit confused. Can "using std::pow;" be accepted by the compilers without a declaration of std::pow? Synge Todo wistaria@comp-phys.org