bugCERTI - Bugs: bug #37722, Error: std::remove_if does not...

 
 

bug #37722: Error: std::remove_if does not work correctly in windows system.

Submitted by:  YongChangShi <shijian>
Submitted on:  Mon 12 Nov 2012 02:37:24 PM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Software errorStatus: Need Info
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: 3.4.1
Reproducibility: Every TimeFixed Release: Unknown

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Apr 2015 01:11:48 PM UTC, comment #2:

Closing it because I lack the feedback info.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Fri 27 Sep 2013 07:31:24 AM UTC, comment #1:

What do you mean by

"Error: std::remove_if does not work correctly in windows system."

Does it crash?
Does it fail?

What is "Windows sytems":

Windows XP, 7, 8 ? 32bits/64bits ?
Using which compiler? Which version ?
Visual Studio [Express] 20xx ?

We can't just replace standard C++ code with something else
without strong explanation.

When you provide code modification could you provide it as a patch please.

http://stackoverflow.com/questions/1648595/how-to-create-a-patch-file-on-windows

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Mon 12 Nov 2012 02:37:24 PM UTC, original submission:

I tried to fixed it.please check.

file:
Subscribable.cc
function:
unsubscribe

original:
void
Subscribable::unsubscribe(FederateHandle fed)
{
std::remove_if(subscribers.begin(),
subscribers.end(),
HandleComparator<Subscriber>(fed));

}

fixed:
*/
void
Subscribable::unsubscribe(FederateHandle fed)//取消订购
{
/added by shijian,begin/
std::list<Subscriber>::iterator i=subscribers.begin();
for(;i!=subscribers.end();)
{
if(i->getHandle()==fed)
{
subscribers.erase(i);
i=subscribers.begin();
if(i==subscribers.end())
{
return;
}

continue;
}
i++;
}
/added by shijian,end/

}

YongChangShi <shijian>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by shijian (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Apr 2015 01:11:48 PM UTCerkOpen/ClosedOpen=>Closed
      Fixed Release3.4.1=>Unknown
    Fri 27 Sep 2013 07:31:35 AM UTCerkStatusNone=>Need Info
      Assigned toNone=>erk

    Back to the top


    Powered by Savane 3.1-cleanup1