Roberto and me this afternoon have discussed about the need to have compile time error when set_universe is called for an interval where such thing is not representable (by example an interval of mpz or mpq without infinity and without unbounded flag on boundaries). So I've written a generic way to write arbitrary compile time check. I post that for review before to commit. I'm open to hear about possible improvement and further needs. -- Abramo Bagnara mailto:abramobagnara@tin.it Opera Unica Phone: +39.0546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
Abramo Bagnara ha scritto:
Roberto and me this afternoon have discussed about the need to have compile time error when set_universe is called for an interval where such thing is not representable (by example an interval of mpz or mpq without infinity and without unbounded flag on boundaries).
So I've written a generic way to write arbitrary compile time check.
I post that for review before to commit.
I'm open to hear about possible improvement and further needs.
Much simpler and easy to read version. -- Abramo Bagnara mailto:abramobagnara@tin.it Opera Unica Phone: +39.0546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
Abramo Bagnara wrote:
Abramo Bagnara ha scritto:
Roberto and me this afternoon have discussed about the need to have compile time error when set_universe is called for an interval where such thing is not representable (by example an interval of mpz or mpq without infinity and without unbounded flag on boundaries).
So I've written a generic way to write arbitrary compile time check.
I post that for review before to commit.
I'm open to hear about possible improvement and further needs.
Much simpler and easy to read version.
It really looks simple and clean. Besides interval's set_universe, this has a couple of other interesting applications in the PPL. Ciao, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
participants (2)
-
Abramo Bagnara -
Roberto Bagnara