
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 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 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
participants (2)
-
Abramo Bagnara
-
Roberto Bagnara