Barry Smith <bsm...@mcs.anl.gov> writes: > Horrible to have to uglify all the source code for all real numbers without > exact hexadecimal representation like this. > > I could live with having > > PetscReal a = .7_Q; > > say (which won't work) but asking me to accept PetscRealLiteral(0.7); doesn't > make me happy. > > PetscReal a = _R(.7) as an unhappy compromise? With imperfect namespacing.
Oh, I figured the non-namespaced version would be used privately in compilation units that make heavy use of it. But #define'ing _R() in a public header would be bad behavior even if it didn't violate the standard.
signature.asc
Description: PGP signature