Use tricks with NaN for representing empty interval. See the Boost Interval Library (http://www.boost.org/doc/libs/1_57_0/libs/numeric/interval/doc/interval.htm)