On Wed, Feb 8, 2012 at 00:43, Jack Poulson <jack.poulson@gmail.com> wrote:
Good to know; I didn't know libquadmath provided that. The catch is that it does not allow one to easily extend templates that previously handled 32-bit and 64-bit base types. On the other hand, a custom complex class could easily just call the built-in functions for __complex128 when instantiated with a base type of __float128.

It'll work fine with PETSc's typedef of PetscReal and PetscScalar. I never like that C++ crap anyway. ;-D

(You could template over the real and complex types separately, but I guess you are assuming a certain syntax for converting between reals and complex.)