[CoinUtils-tickets] Re: [COIN-OR Common Utilities] #28: umr due to set not defined when first insert

COIN-OR Common Utilities coin-trac at coin-or.org
Sat Apr 7 22:42:16 EDT 2007


#28: umr due to set not defined when first insert
-------------------------+--------------------------------------------------
  Reporter:  mgalati     |       Owner:  somebody
      Type:  defect      |      Status:  new     
  Priority:  major       |   Milestone:          
 Component:  component1  |     Version:          
Resolution:              |    Keywords:  umr     
-------------------------+--------------------------------------------------
Comment (by ladanyi):

 Try the following. Replace the line
 {{{
 if (! is.insert(index).second)
 }}}
 with
 {{{
 std::pair<std::set::iterator, bool> insert_result = is.insert(index);
 if (! insert_result.second)
 }}}
 If you get a UMR on the test then the STL implementation used is faulty
 and it should be easy to create a few lines long sample code to prove it
 and complain to the vendor. (You might need to further break up the pair
 into separate variables to see where things go wrong.) If you don't ge a
 UMR then we'll just do what I suggested :-).

 --Laci

-- 
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/28#comment:2>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects



More information about the CoinUtils-tickets mailing list