Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Compiler Bug

Vincent_P_
Beginner
204 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
204 Views

Hi,

Could you please help with a test case?

Thanks,
Varsha

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