Specifying precision in vector<mpf_class>?
Niels Möller
nisse@lysator.liu.se
27 Aug 2003 15:34:52 +0200
gerardo.ballabio@unimib.it (Ballabio Gerardo - Dip. di Scienza dei Materiali) writes:
> The problem is that in the current implementation, mpf_class is a
> specialization of a generic "gmp_expr" template class, renamed with a
> typedef like this:
>
> typedef gmp_expr<mpf_t> mpf_class;
[...]
> Thus, mpf_class must be defined independently on gmp_expr, but then
> we'd have two distinct types and this would require the duplication of
> a lot of stuff. I believe it can still be done, but I doubt that it's
> worth the effort.
Can't you just make the new template class inherit gmp_expr<mpf_t>?
(Sorry, I haven't read the code, and I'm no C++ guru either).
/Niels