Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Vincent_P_
Beginner
55 Views

Compiler Bug

I don't know where else to post, so I thought I would do it here.  If there's a better place, please tell me.

Found an STL bug that I thought I would report in std::forward_list.  The erase_after does NOT return the next element after the one being erased.  It returns the first element in the list.  This caused my program to re-traverse the list and caused unexpected things to happen. 

particleIter = b.content.erase_after(lastIter); // IMPLEMENTATION BUG:  Doesn't return element after one erased.  Returns first element in list instead

 

particleIter = std::next(lastIter);         // workaround

 
0 Kudos
2 Replies
Varsha_M_Intel
Employee
55 Views

Hi,

Could you please help with a test case?

Thanks,
Varsha

Judith_W_Intel
Employee
55 Views

 

If this truly is an STL bug (a bug in the library and not the compiler) then you should report it to GNU (Linux) or Microsoft (Windows).

Intel does not distribute its own standard libraries -- it simply uses the ones provided on the system.

thanks

Judy