Boost logo

Boost Users :

Subject: Re: [Boost-users] [ICL] seems not to handle sets that contain the maximum element of the domain type.
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2015-11-18 13:08:25


Just answered in the other mail.

2015-11-18 13:10 GMT+01:00 Stephen Hewitt <shewitt.au_at_[hidden]>:

> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net