Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Compiler Bug

$
0
0

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

 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>