Topic: template function arguments - state of the standard?
Author: stan@sabaac.NoSubdomain.NoDomain (Andrew Staniszewski)
Date: Fri, 26 Feb 93 18:26:39 GMT Raw View
I was wondering what the state of the standard was on templates. I read in
Lippman's primer that some discussion was going on lifting the requirment for an
exact match of argument. I have run accross a case where the definition of the
template function makes it almost to difficult to use. When trying to declare a
template function for take the derivitive of an arbitrary function, and therefore
pass in a pointer to a function:
template <class RType, class AType, class VType>
RType derivitive(AType, VType, RType (* const func)(AType,VType));
in order to use the function I have to either typecast the function to a
const pointer to a function which has its own set of arguments and return
type!!! This is no fun at all :).
Author: steve@taumet.com (Steve Clamage)
Date: Tue, 2 Mar 1993 18:19:44 GMT Raw View
stan@sabaac.NoSubdomain.NoDomain (Andrew Staniszewski) writes:
>I was wondering what the state of the standard was on templates. I read in
>Lippman's primer that some discussion was going on lifting the requirment for an
>exact match of argument.
Very little has yet been done by the C++ Committee in the area of
templates. We have mainly been working on more basic things first.
It seems very likely that the "exact match" requirement in the ARM
will be eased, in particular for conversion to public base class
pointers and references. Current implemenations already allow this.
--
Steve Clamage, TauMetric Corp, steve@taumet.com