The third question is about a runtime error I'm getting in the above code. The comment in main shows the scenario. Basically if I use 0xffff as the end of the first range I get an ASSERT at runtime whereas 0xfffe works fine.You can use icl interval containers with limited integral numeric domain-types safely on intervals using values from ++std::min<T>() to --std::max<T>(): Two values less. So if you want to manage a domain of values like in your example, you'd need to use a larger value type. It is possible to make the code handle those corner cases correctly (yet not trivial, since it is generic code). For achieving that the most frequently called functions would all need to make additional checks making the code ugly and more slowly. And yes, this information should be added to the documentation.