I would like to define an object representing a mathematical domain from a list of constraints, but I don't have a clear idea on how to do that.

For example, I start from IR and I have the following constraints :

* x > 0
* x is not in ]3,5]
* x is not in [7,12[

Then, my domain is ]0,3] U ]5,7[ U [12,+oo .

**How can I nicely store that in a C++ structure ?** Have you ever did that before ? Moreover, I want to be able to check easilly if the domain is empty.