Re: [Boost-bugs] [Boost C++ Libraries] #5559: interval_set works not correct with custom compare function

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5559: interval_set works not correct with custom compare function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-25 10:59:47


#5559: interval_set works not correct with custom compare function
------------------------------+---------------------------------------------
  Reporter: denis@… | Owner: jofaber
      Type: Bugs | Status: new
 Milestone: Boost 1.47.0 | Component: ICL
   Version: Boost 1.46.1 | Severity: Problem
Resolution: | Keywords:
------------------------------+---------------------------------------------

Comment (by jofaber):

 Hi Denis,

 thank you for your input. Your code example does not compile with the
 include-files given. UINT32_MAX is not defined. When using
 (std::numeric_limits<uint32_t>::max)() instead, I found that the claimed
 bugs for q3 and q4 do not occur.

 Which leaves us with the assertion violation from case q5. I have fixed
 the code for that and created a test.
 {{{#!c++
 BOOST_AUTO_TEST_CASE(ticket_5559_Denis)
 {
     //Submitted by Denis
     typedef boost::icl::interval_set<boost::uint32_t, std::greater> Set;
     const uint32_t ui32_max = (std::numeric_limits<uint32_t>::max)();

     Set q1( Set::interval_type::closed(ui32_max, 0) );
     Set q5( Set::interval_type::closed(0, 0) );

     BOOST_CHECK_EQUAL(q1, q1+q5);
 }
 }}}

 Cheers,
 Joachim

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5559#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC