dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10110
Re: New Function implementation
On Tue, Oct 14, 2008 at 11:58:00PM +0200, Martin Sandve Alnæs wrote:
> Is std::pow a template function?
I don't think so (but /usr/include/bits/mathcalls.h is a bit cryptic):
__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
--
Anders
> Maybe you can define pow for dolfin::real as a template
> specialization, something like:
>
> template<>
> dolfin::real std::pow(dolfin::real, dolfin::real) {...}
>
> In that case it should probably not be in the dolfin:: namespace.
>
> (It is a while since I did template stuff like this, I might be way off here).
>
Attachment:
signature.asc
Description: Digital signature
References