Just answered in the other mail.

2015-11-18 13:10 GMT+01:00 Stephen Hewitt <shewitt.au@gmail.com>:
ICL seems not to handle sets that contain the maximum element of the domain type.
I sent a similar mail a day ago, but I've simplified my example. Here's the code:

Windows 7
Boost 1.59.0

----BEGIN CODE---
using namespace std;
typedef boost::icl::closed_interval<boost::uint16_t, std::less> interval_t;
typedef boost::icl::split_interval_set<boost::uint16_t, std::less, interval_t> set_t;

set_t s;

s += interval_t(0x0000, 0xffff);
s += interval_t(0xa000, 0xbfff);
cout << "BAD:  " << hex << s << endl;

s.clear();
s += interval_t(0x0000, 0xfffe);
s += interval_t(0xa000, 0xbfff);
cout << "GOOD: " << hex << s << endl;
----END CODE---

---BEGIN OUTPUT---
BAD:  {[0,9fff][a000,ffff]}
GOOD: {[0,9fff][a000,bfff][c000,fffe]}
---END OUTPUT---

The bad example seems to fail because the set contains 0xffff. In the good example I use 0xfffe.


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Interval Container Library [Boost.Icl]
http://www.joachim-faulhaber.de