From: hartmann Date: Tue, 23 Aug 2005 08:41:47 +0000 (+0000) Subject: Use typeid instead of sizeof. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f11e458ea7efc2fc54aece3b3b27110f19c88ae;p=dealii-svn.git Use typeid instead of sizeof. git-svn-id: https://svn.dealii.org/trunk@11308 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/petsc_18.cc b/tests/bits/petsc_18.cc index 74703f1f48..d535fa98a7 100644 --- a/tests/bits/petsc_18.cc +++ b/tests/bits/petsc_18.cc @@ -33,7 +33,7 @@ void test (PETScWrappers::Vector &v) v.compress (); // then check the norm - const double eps=sizeof(PetscScalar)==8 ? 1e-14 : 1e-5; + const double eps=typeid(PetscScalar)==typeid(double) ? 1e-14 : 1e-5; Assert (fabs(v.l2_norm()-std::sqrt(norm))