 <p><strong>Answering my own question.</strong></p> <p>Actually, I followed the idea of sbabbi using a list of intervals coming from <code>boost/numeric/interval</code>, representing the union of intervals.</p> <p>Here is an example :</p> <pre><code>typedef boost::numeric::interval_lib::rounded_math&lt;double&gt; RoundedPolicy; typedef boost::numeric::interval_lib::checking_base&lt;double&gt; CheckingPolicy; typedef boost::numeric::interval_lib::policies&lt;RoundedPolicy,CheckingPolicy&gt; IntervalPolicies; typedef boost::numeric::interval&lt;double,IntervalPolicies&gt; interval; //... bool is_interval_empty(const interval&amp; inter) { return boost::numeric::empty(inter); } void restrict(interval&amp; domain, const interval&amp; inter) { for(std::list&lt;interval&gt;::iterator it = domain.begin(); it != domain.end(); ++it) *it = boost::numeric::intersect(*it, inter); domain.remove_if(is_interval_empty); } void restrict(interval&amp; domain, const interval&amp; inter1, const interval&amp; inter2) { for(std::list&lt;interval&gt;::iterator it = domain.begin(); it != domain.end(); ++it) { domain.push_front(boost::numeric::intersect(*it, inter1)); *it = boost::numeric::intersect(*it, inter2); } domain.remove_if(is_interval_empty); } //... std::list&lt;interval&gt; domain; for(unsigned long int i = 0; i &lt; constraints.size(); ++i) { if(constraints[i].is_lower_bound()) { interval restriction(constraints[i].get_lower_bound(), std::numeric_limits&lt;double&gt;::infinity()); restrict(domain, restriction); } else if(constraints[i].is_upper_bound()) { interval restriction(-std::numeric_limits&lt;double&gt;::infinity(), constraints[i].get_upper_bound()); restrict(domain, restriction); } else if(constraints[i].is_forbidden_range()) { interval restriction1(-std::numeric_limits&lt;double&gt;::infinity(), constraints[i].get_lower_bound()); interval restriction2(constraints[i].get_upper_bound(), std::numeric_limits&lt;double&gt;::infinity()); restrict(domain, restriction1, restriction2); } } if(domain.size() == 0) std::cout &lt;&lt; "empty domain" &lt;&lt; std::endl; else std::cout &lt;&lt; "the domain exists" &lt;&lt; std::endl; </code></pre>