Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

Compiler Bug

Vincent_P_
Beginner
131 Views

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
131 Views

Hi,

Could you please help with a test case?

Thanks,
Varsha

Judith_W_Intel
Employee
131 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

Reply